• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Essential Premium WooCommerce Plugins - WP Desk
  • Plugins
  • Bundle
  • Support
  • Blog
  • My Account
  • 0

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

Monika Kwiatkowska

How to translate a WordPress plugin?

Updated: January 20, 2022 / Tech Posts

This article will show you how to translate a WordPress plugin to your local language of choice. We will look at the translator plugin called Loco Translate and the translation editor Poedit.

.mo and .po files in WordPress

Machine Object (MO) and Portable Object (PO) are translation management files in WordPress. PO files contain understandable human strings, which are compiled into binary MO files. As you can probably guess, we will be using .po files to edit the translation.

How to translate the plugin with Poedit?

For translating your plugin, you need:

  • Poedit Editor installed on your computer. Here you can download OS X and Windows versions
  • Flexible Invoices for WooCommerce plugin files on your computer

In this article, I will use the free version of Poedit Editor, and we will translate the Flexible Invoices for WooCommerce plugin.
You can find the PO and MO files in the Flexible Invoices plugin inside this path flexible-invoices-woocommerce > lang > flexible-invoices-woocommerce-pl_PL.po.

Po file in Flexible Invoices WooCommerce Plugin

After installing, please open the editor and click File > Open. Please remember you can only edit .po files!

Now you see all the strings, and you can start with the translation. Click on each available string and write your translation into the Translation field.

Translate plugin strings in Poeditor

Please notice that you have to add all the special characters from the source (original) text to the translation field. It will ensure the right translation by printing all possible variables.

Translate plugin strings with special characters

When you’ve finished, you can save your new translation File as a new one. Please remember that you have to save this File with the plugin name flexible-invoices-woocommerce and the language-specific suffix at the end of the name.

For example, the Spanish translation file name should be flexible-invoices-woocommerce-es_ES. This is very important; otherwise, your translation will not work. Then choose Compile to MO. The files always come in pairs (.po and .mo). WordPress will interpret and pull data from .mo files.

Create a .po files in Poeditor

The last step is adding translation files to your server. You can do that through FTP. Go to this path: wp-content > languages > plugins. Add both .mo and .po files into this folder.

Remember that language on your invoice will depend on the current language of the WordPress dashboard.

And that's it! The plugin is translated. Both your invoices and the interface should appear in the language you have chosen.

Translate plugin with Loco Translate

Loco Translate is a plugin to manage your translation directly from the WordPress dashboard. It is entirely free, so all you have to do is install it on your site. First, navigate to your Plugins. Then click the Add new button. And find Loco Translate on the bottom left of your Dashboard. Finally, install and activate the plugin.

Installing Loco Translation plugin

Let's translate the Flexible Invoices for WooCommerce plugin with Loco Translate!

First, choose the plugin, list all active plugins, and click Flexible Invoices for WooCommerce. Secondly, click New Language and select your language from a dropdown. Please remember that you also have to choose this language from Settings > General to show translation on your site.

Find a plugin in Loco Translate

Then select the location of your translation and start translating the plugin. Now, click on every string one by one and translate it to the language of your choice. Save your work and check changes on your site.

Translate strings in Loco Translate

Done, Flexible Invoices for WooCommerce is translated!

In the article, I was translating the Flexible Invoices for WooCommerce plugin.
If you need to issue invoices in your WooCommerce store you may install this free plugin in your WordPress or download it from the WordPress repository.

Choose the best way to translate plugins in WordPress

As you can see, translating a WordPress plugin is not so complicated. There are many ways of translating. I showed you only two but, in my opinion, the easiest ones. You can translate other plugins and themes the same way I did.

If you want to translate just a few phrases inside a WordPress plugin, check the SayWhat plugin SayWhat plugin. It's a simple and quick way to translate strings of plugins and themes.

One more thing! If you want to test our plugins, create a DEMO account. Check out how to enhance your store with new plugins and their functionalities.

For more articles about plugins and e-commerce, see our blog.

Tweet

3 minutes read1429 views

Monika Kwiatkowska

Quality Engineer and Scrum Master in WpDesk Heroes Team. Huge fan of books, bikes, and board games.

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

WP Desk › Tech Posts › How to translate a WordPress plugin?

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Contact us

Products

  • Premium Plugins
  • Get Support
  • WooCommerce Invoices
  • Email Marketing
  • Octolize

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2023 WP Desk