How to translate WordPress themes and plugins with Loco Translate

There are thousands of plugins and themes all around the world. You can find them on WordPress.org, Envato, WooThemes, and other marketplaces.
If your main language is English, then there’s not any problem with them. You just download the theme/plugin, install it and you are ready to go.

But what if you are Italian? Dutch? Icelandic?
Nobody, or at most few developers, develop their plugins and themes in a language different from English.

You will need to translate it, and I’ll explain you how.

There are two ways to do it.

  1. Directly within WordPress by using a localization plugin
  2. On your PC/Mac, using Poedit

Today you will learn how to translate themes and plugin with a WordPress plugin, Loco Translate.

Translating with Loco Translate

First of all, you need to install Loco Translate on your website, and you can do so like you do with any other WordPress plugin.
Go to Plugins > Add New, search for Loco Translate in the search field and then click on Install Now when you find it. After installing it, click on Activate.

When you are ready, you will have a new menu item named Loco Translate on the left in your Dashboard.
Click on Loco Translate > Manage Translations. You will see a screen like this:

loco-manage-translations

The screenshot above shows a list of themes without any translation included in them. If they already have translations included, they will look like this:

loco-translated

You can now add a new language for your theme/plugin (I’ll show you how to do it for a theme, but for a plugin is exactly the same, just scroll down the list and you will find the Plugins list).

Add a new translation

Click on New language and choose which language you want to add.

add-new-language

The needed language files will be created and you will see a screen like this:

translation-screen

Click on a string in the box Source text to start translating. Type the string’s translation in your language in the box below, named Italian translation (if you are translating in Italian, it will be Dutch translation if you are translating in Dutch, etc.).

When you translated all the strings (or when you are done for the day), click on the button Save on the top to save the current status of the translation. The plugin will save the PO file and will generate a MO file, and your theme/plugin will use that translation from now on.

PO? MO? What are these files?

WordPress uses PO and MO files to manage translations. The reality is that WordPress only needs MO files to manage translations.
PO files are human readable translation files, they are those files with a list of strings ready to be translated or with a translation already included. They are those files that Loco Translate uses to show you the strings, like in the screenshot above.

MO files instead are compiled files used by WordPress to get the translation of a string. If you try to open a MO file with a text editor, you won’t understand anything of its content.

FAQs

I translated a theme/plugin but the translation is not loading/working. Why?

Usually this means that you forgot to save the translated file, or that it’s in the wrong path. Usually plugins and themes search for translations in the folder /languages or /i18n inside their root, but this may change. Also some of them load their language files from the path /wp-content/languages/ which is the default WordPress languages root. If they do, put your MO file in there because it will be update safe.

I updated my theme/plugin and I lost my translation. How can I recover it?

I’m afraid you can’t unless you saved a PO/MO file somewhere on your computer. Some themes/plugins allow you to put translations in the folder /wp-content/languages/ which is the main languages folder used by WordPress. That folder is update safe and your translations won’t be lost while updating. If your theme/plugin does not allow it, contact its author and ask him to include that path in the code of the plugin/theme.

Some strings are translated in Loco Translate, but they are not loading, why?

Be sure that they are not Fuzzy. A Fuzzy string means that it needs to be checked. The translator was probably not sure of his translation, so marked it as Fuzzy to let others confirm that the translation is correct before to use it.

In some cases, like while using WooCommerce, it could mean that your theme is overriding the plugin templates. Or it could also mean that there’s an error in the code.

Help the community

If you translated a theme/plugin, you can give a huge help to the community by sharing your translation. Don’t keep it only for you, send it to the theme/plugin author and ask him to include it in the next release so also other people who speak your language can use it.


More Posts That You Might Like…


24 responses to “How to translate WordPress themes and plugins with Loco Translate”

  1. Hello,
    Can you please guide me how to translate the official WP notification emails (eg registration) through Loco translate?

    Thank you so much.

    1. Hi Vaggelis,
      Once you installed the plugin you should find it in Loco Translate to be translated.

      You can just follow this article after installing your plugin.

  2. Hi, sometimes I see a 400 server error when I browse your webpage. Just a heads up, regards

    1. Thanks for the info Niry!

  3. Hi, your translation article is wonderful so please sharing it. Thank you

    1. Thank you Sanjay! I’m happy you like it!

  4. Such a nice and useful information, thanks for sharing Nicola Mustone.

  5. Hi, I wnder if/hw the plugin works with woocommerse product upload files.
    Thanks.

    1. Do you mean translating files uploaded to WordPress? No, it only works with plugins, themes and the WordPress core.

  6. Hi I’d like to translate the WooCommerce Subscriptions Plug-in from English to Chinese, does it mean I need to translate all the words by myself and save? Is there any official translation package for this plug in?
    Thanks.

    1. Hi Eddie,
      Yes, you need to translate everything. I don’t think there’s an official Chinese translation for it, but you can contact the developers and ask them.

  7. Thanks. Cool post. Do you know where to find the term in the footer:
    This site uses Akismet to reduce spam. Learn how your comment data is processed.
    I cannot find it the theme’s translation – and neither in the Akismet file?

  8. is this plugin free or requires payment after translating certain words

  9. thank you for this, really appreciate it

  10. Love your resources! I appreciate your details and depth writing style and all your eye cache points was so awesome.

  11. NSNHVerification Avatar
    NSNHVerification

    Great tool to translate wp themes. Nice information.

  12. This is a great tool to translate wp-themes. Nice information.

  13. I wonder if there was a solution to Chinese translation?
    Also Hey! thanks for making this available, our developers love it 🙂

  14. Great tool to translate wp themes.

  15. The translation is not working, I added Spanish Colombia and it didn’t do anything, I don’t know why.

  16. nice post
    thanks for sharing

  17. Great Article. Thanks for posting such an informational article.

  18. We can also automatically translate all translatable strings of any plugin or theme using Loco Automatic Translate Addon along with this famous Loco Translate plugin.

    https://wordpress.org/plugins/automatic-translator-addon-for-loco-translate/

Leave a Reply

Categories

Newsletter

Receive new articles from this blog directly in your inbox!

No spam guaranteed!

Blog at WordPress.com.

%d bloggers like this: