Translating Themes

ATOMLABS allows you to translate each theme into different languages without having to edit the template files. To translate the theme, you need a translation software such as Poedit. It is a free software available in Mac, Windows, and Linux. After you've downloaded and installed it, follow the next steps to translate your theme.

Step 1: creating a new catalog:

Start Poedit and go to File > New catalog...

In the Translation properties tab, set the project name and version. You can dismiss most options, but if you want, set your target language in the Language field.


Click on the Sources paths tab, then 0n the New Item button highlighted in the image. It will create a new entry in the list below. Type two dots (..) as shown.


Go to the Sources keywords tab, for each of the following strings, click on New Item and type the characters indicated:

  • __
  • _e
  • _n:1,2
  • _x

poedit sources keywords

Finally click OK and save it in the languages sub-folder in your theme folder. Name the file after your language locale. For example, name it fr_FR for French, es_ES for spanish, pt_BR for brazilian portuguese and so on (read this list for more codes).

Step 2: Translating With Poedit:

After saving, Poedit will pickup all strings available for translation. When it's done, you should see a list of strings (in English) used in the theme. Go through the list and enter the translation text in the lower box. When you are done, click File > Save and Poedit will generate a .mo file (eg. automatically on save. If you don't see the .mo file, go to Poedit > Preferences, under the "Editor" tab, check "Automatically compile .mo file on save".



Step 3: Upload the PO and MO File (if you were working locally)

If you were working on a local test server, you'll have to upload the .po and .mo file (generated from Poedit) to the "theme/languages" folder through FTP or similar.

Step 4: wp-config.php WPLANG Setting

Finally, open the wp-config.php file. Look for the "WPLANG" setting and add the language code. If you can't find any WPLANG constant in the wp-config.php file, just add the following line manually before the line that says /* That's all, stop editing! Happy blogging. */

 define('WPLANG', 'fr_FR');