How to Translate Your Theme to Other Languages

To translate the theme, you may use a popular translation software Poedit. It is a free software available in Mac, Windows and Linux. You can download and install it then follow below to translate your theme.

  1. Creating a new catalog:
  2. Start Poedit and go to File > Create new catalog...

    In the Project Info tab, set the project name and version. Select your target language in the Language dropdown and ignore the other options.

    Click on the Paths tab, then click the New Item icon. This will create a new entry in the list below. Enter double dots ".." like below.

    Go to the Keywords tab, for each of the following strings, click on New Item and type the characters indicated:
    __
    _e
    _x

    Click OK and save it in the languages sub-folder in your theme folder. Name the file that match your language locale. For example, if you're translating into French, name it fr_FR (read this list for other codes).

  3. Translating With Poedit:
  4. Poedit will scan all strings available for translation. When it's done, you'll need to go through the list and enter the translation text in the lower box. After you finish translating the strings, click File > Save and Poedit will generate a .mo file (eg. fr_FR.mo) automatically when save. If you don't see the .mo file, go to Poedit > Preferences, under the "Editor" tab, check off "Automatically compile .mo file on save".

  5. Upload the PO and MO File
  6. Upload the generated .po and .mo files to the "theme/languages" folder on your WordPress site through FTP. One last step is to open the wp-config.php file in your WordPress directory. Look for the "WPLANG" setting and add the language code. For example: define('WPLANG', 'fr_FR');

    Back to Documentations

Browser Compatibility

AnyWP themes are tested in all major browsers.

Latest News