Thanks to the tower of Babel, and maybe a couple other reasons, there are more languages in the world than we can shake a stick at. Most WordPress plugins are developed in English, and maybe a couple of other languages. Let's see how to translate WordPress Plugins in any language.
Table of Contents
Can we translate any WordPress plugin?
Not all WordPress plugins are created equal, and not all plugins are designed to allow translation in other languages.
The fastest way to see if an installed plugin can be translated it to log in our FTP and take a look at the plugin's folder and files. We will find the plugins folder within /wp-content.
If a plugin contains a "language", "languages", or "lang" folder...
...and we find one or more .po files inside, then we can translate it. We just need to download the main .po file. It could be a "default.po", an "XXXX-en_US.po", or something similar.
We can ignore the .mo files. These are the files that WordPress uses for the translation, but they are automatically generated from the .po files.
Download and install Poedit
Poedit is a freeware multi-platform app to translate WordPress plugins, by editing the .po files. We will find it at https://poedit.net/download
As opposed to many freeware programs, Poedit's installation won't attempt to change the browsers' homepages, install toolbars, and other unwanted programs.
From within Poedit, we open the .po file we downloaded.
First thing we do, we go to File -> Preferences
...and fill in our information as a translator. We also make sure that the "Automatically compile MO file when saving" option is checked.
Then we go to Catalog -> Properties...
...and select the proper language we will translate the particular po file.
Translate WordPress plugins
Translating WordPress plugins with Poedit is easy. We just select the source text and type the translation.
Simple as it is, the plugin of the example has more lines to translate than the year has days. More complex plugins can very well have thousands of lines.
We won't need to take our hands off the keyboard to click on the next source to translate. By pressing Ctrl+Enter, we submit the translation and move to the next one in line.
Depending on the language, Poedit will offer popular translation options, which we can quickly add with ctrl+1, ctrl+2, etc. This can speed up the translation process considerably.
Unfortunately, the online suggestions are limited to 10 every time we start the program.
To get unlimited suggestions, we need to upgrade to Poedit Pro, for 20$, which is probably not worth if we only want to translate one or two plugins.
Poedit also features an automatic spell checking option as we type.
...but we can always add something to the dictionary, in case it's right and just not recognized.
We make sure to translate each entry exactly as it is, including the punctuation.
If we find any HTML tags or PHP code, such as <strong>...</strong> and "%s", we leave it as is.
Some entries will have a different singular and plural form. Those have two tabs so we can enter the respective translations.
When we translate WordPress plugins, we don't translate just the front-end, but the back-end as well.
If we prefer the back-end in the original language, we can skip those entries.
There is also a handy "Find..." option, where we can look for specific entries to translate, or correct.
Sometimes, the very same entry could show two, or more times. This isn't a mistake, it just means that the same text is used in two places, and it gives us the chance to get a more accurate translation for each place.
After we finish the translation, we click on Validate.
This won't show any language errors, but it will look for errors in entries with PHP code.
After that, we save the file. Poedit will automatically create the .MO file. Its default icon is a bit faded, to differentiate it from the po file.
It is important to change the name of the translated files for our respective language. We just follow the plugin's template, and add the correct language code.
Sometimes, we might need to add the country code, like in el_GR. It depends on our WordPress installation.
We make sure both the .po and .mo files have the same filename, and then we upload them to the plugin's folder.
Take note that most plugins will delete the translated files on each update. So, we should keep the translated files, and re-upload them anytime the plugin updates.
Just uploading the proper language file will turn the original plugin...
...to the translated one.
We should extensively check the plugin for mistranslations...
...and for places where the original CSS doesn't fit the new translation.
For the mistranslations, we can edit the .po file. For the CSS, however, we need to edit the theme's or the plugin's CSS files.
Did you find it easy to translate WordPress plugins?
If you had any trouble with Poedit or the translation for a particular plugin, let us know in the comments section.
- Better Multilingual SEO in WordPress with Hreflang
- Add Facebook Page Plugin with Asynchronous Code
- Gamify WordPress to Improve your Visitors' Engagement
- Fix Facebook Link Share Problems on your Website
- How to add Push Notifications on a WordPress Website
Do you want to support PCsteps, so we can post high quality articles throughout the week?
If you prefer your purchases from China, we are affiliated with the largest international e-shops: