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.
- Directly within WordPress by using a localization plugin
- 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:
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:
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.
The needed language files will be created and you will see a screen like this:
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.
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
/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.
Can you please guide me how to translate the official WP notification emails (eg registration) through Loco translate?
Thank you so much.
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.
Hi, sometimes I see a 400 server error when I browse your webpage. Just a heads up, regards
Thanks for the info Niry!
Hi, your translation article is wonderful so please sharing it. Thank you
Thank you Sanjay! I’m happy you like it!
Such a nice and useful information, thanks for sharing Nicola Mustone.
Hi, I wnder if/hw the plugin works with woocommerse product upload files.
Do you mean translating files uploaded to WordPress? No, it only works with plugins, themes and the WordPress core.
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?
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.
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?
is this plugin free or requires payment after translating certain words
It is free.
thank you for this, really appreciate it
Love your resources! I appreciate your details and depth writing style and all your eye cache points was so awesome.
Great tool to translate wp themes. Nice information.
This is a great tool to translate wp-themes. Nice information.
I wonder if there was a solution to Chinese translation?
Also Hey! thanks for making this available, our developers love it 🙂
Great tool to translate wp themes.
The translation is not working, I added Spanish Colombia and it didn’t do anything, I don’t know why.
thanks for sharing
Great Article. Thanks for posting such an informational article.
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.