Theme Translation

This tutorial shortly explains how you can translate a WordPress theme into your native language.

Table of Contents

Translation Basics

Our WordPress themes are localized using the GNU gettext framework and are translation-ready. It is the common way to translate WordPress core and every theme or plugin.

Every theme includes an extra language file with the file ending .pot which you can use to translate the theme. The .pot file is basically a list of all the text lines used in the theme files in English language.

Moreover a theme includes .po and .mo files. First are created from the .pot file and contain both the original language (= English) and all translated text strings from the translated language.

Therefore these files are named according to their language codes. (de_De.po, nl_NL.po or es_ES.po for example). The .mo files are just compiled exports from the .po files and used by WordPress itself to translate the theme.

Now the only thing you have to do is to create a new .po file from the .pot catalog file, translate all text strings and save the .po file with your language code. There are different ways to do this.

1st Method: Translate Themes with the Loco Translate Plugin

The easiest way to translate your theme is by using the Loco Translate WordPress plugin. After you have installed and activated the plugin, simply go to Loco Translate → Manage translations and translate the theme from your WordPress backend following the plugin instructions.

In case you’re an experienced computer user you may want to use Poedit to translate your theme (see below), which is more complex but faster.

2nd Method: Translate Themes using the Poedit Program

Poedit is a common program which you can use to translate the theme. It’s available for free on poedit.net.

After you have installed Poedit, you can open it and select File → New Catalog from POT file. Then select the .pot file from the theme you wish to translate which you can find in the /includes/lang/ or /languages/ folder of your theme.

Then go through every line of text and translate it to your native language. Afterwards you can save the catalog with your language code (for example es_ES.po). Normally Poedit automatically creates the .mo file and saves it, too.

The last step you have to do is to upload your created language files to the language folder of your theme using FTP.

3rd Method: Join the WordPress.org Translation

Proably the best way to translate a ThemeZee WordPress theme is to join the translation project on wordpress.org. You should translate the theme on wp.org if you want to improve the existing translation files already included with our themes. You only have to register or login to your wordpress.org account to start translating immediately.

The big benefit of the wp.org translation lies in the online collaboration part. You can see which parts of the theme have already be translated and contribute to the translation even if you only translate a few strings. Moreover you can control and enhance the translation of other users and don’t have to deal with translation files.

Translation Projects

Configure Site Language in WordPress Settings

WordPress will automatically use the right language files if they exist. You can set the site language of your WordPress installation on Settings → General. You can select your language at the bottom of the page:

site-language

Share your Language Files

In case you have already translated a theme or plugin a lot of users would be delighted if you share your translation files with the community. Just send them to support@themezee.com and we will include the translation files within the next update. Thank you so much for your contribution!