Theme translation (localization)

Find out how to localize WordPress themes (and plugins) into your language.

Every WordPress theme contains some texts that need to be translated into your language if you are building a non-English website. My themes are fully translation ready and most of them also support Right-To-Left (RTL) languages.

To enable your language on a WordPress website, please switch WordPress into the desired language localization first.

Translating free themes at WordPress.org

If you have obtained the theme from WordPress.org themes repository, please translate the theme by clicking the “Translate ThemeName” link in WordPress theme page sidebar.

Translating premium/any theme

Translating using Poedit

(Replace themeslug below with your theme folder name.)

  1. Make a copy of the original ileana/languages/themeslug.pot file.
  2. Rename the copied file now: add hyphen followed with your language code locale, and change the file extension to “po”. For example, the British English file would be named themeslug-en_GB.po.
  3. Use Poedit to translate the file and export (save) translation in “mo” file format.
  4. Upload translated themeslug-en_GB.mo and themeslug-en_GB.po file into your WordPress languages directory, into themes folder (such as /wp-content/languages/themes/themeslug-en_GB.mo (if the themes folder does not exist in your WordPress languages directory, create it).

If you are using a block theme (full site editing theme), continue with these additional steps:

  1. For JavaScript localization we need to create additional JSON translation files. In your computer terminal/command line/SSH set the directory to /wp-content/languages/themes/.
  2. Using WPCLI run this command to create the JSON file(s): wp i18n make-json themeslug-en_GB.po --no-purge.
  3. If the themeslug-en_GB.po file contains JavaScript translation strings, WPCLI should create themeslug-en_GB-{md5}.json file(s) for you. You are done now.

REMINDER:
All translation files will be deleted from /wp-content/themes/themeslug/languages folder when you update the theme. Do not place your custom translation files into that folder!

Translating directly in your WordPress dashboard

If you would like translate the theme directly in your WordPress dashboard you need to use a specialized plugin for that. Please install and activate Loco Translate plugin. For instructions on how to use the plugin please refer to beginner’s guide and/or technical overview.

Don’t forget to translate your plugins too!

WordPress website is built using WordPress system itself, a theme and plugin(s). There is a very high probability that WordPress system is already translated into your language, so, you don’t need to do it on your own.
You have also learned how to translate the theme into your language above.

But what about plugins and their texts?

If you are lucky, your plugin contains your language localization files already and you don’t have to do anything. But if you need to translate a plugin into your language, the best advice is to check the plugin’s documentation for instructions.

Alternatively you can also use Loco Translate plugin (again) to translate your plugins directly in your WordPress dashboard.

Right-To-Left (RTL) languages

Quite often I receive a question like “How can I enable RTL on my website/theme?” The solution is pretty simple, just install and activate RTL language in your WordPress. The theme follows WordPress settings and automatically loads RTL styles for you. Here are some helpful resources:

Please understand that the theme might not be translated to you language though. In that case, please follow the theme localization instructions above.

Updated on: