The theme includes two translation files, one for frontend strings (what visitors will see on your site) and one for backend strings (what admins will see when editing the theme options).
- /languages/storm.pot – for the frontend
- /admin/languages/storm_admin.pot – for the backend
You can translate either one or both if required. You can use these files along with translating software such as Poedit to translate the theme. Please follow the instructions below to translate the theme.
What you will need
- Translation software to read .pot files and save translations as .mo files, we recommend Poedit
- The theme and translation files which you can find at /languages/storm.pot and /admin/languages/storm_admin.pot inside the theme files
- Your WordPress locale code which you can find on this page at the time of writing. After the section title of each language, in brackets, you’ll find the locale code. For example:
- For Polish the locale code is
- For Spanish the locale code is
- For German the locale code is
- For Polish the locale code is
Download and install Poedit or a similar translation tool. Click here to go to the Poedit download page. Once you’ve installed Poedit, run the program. If this is your first time running Poedit, you’ll be prompted to enter your name and email address. This information is added to the top of the translated files as the last translator. You can leave these blank if you’d rather not enter them. Press OK.
On the Poedit menu, go to File then New catalog from .POT file. and open the file /languages/storm.pot if you are translating the frontend or /admin/languages/storm_admin.pot if you are translating the backend.
A Settings dialog box will appear, fill out the information.
- Project name and version – this should be automatically filled out
- Team – set this to the name of your translation team or leave it blank
- Team’s email address – set this to the email address of your translation team or leave it blank
- Language – select the language you intend to translate to
- Country – select the country of the above language
- Charset – select the character set of the translation or leave it at utf-8
- Source code charset – set it to utf-8
- Plural forms – IMPORTANT set this to the plural form setting for your language, you can find your plural form setting on this page
You’ll now be prompted to save the file as a .po file. You will need to change the filename to be the following.
- For frontend translations (storm.pot) the file name should be [LOCALE_CODE].po and saved into the /languages/ folder, for example:
- For Polish, save the file as /languages/pl_PL.po
- For Spanish, save the file as /languages/es_ES.po
- For German, save the file as /languages/de_DE.po
- For backend translations (storm_admin.pot) the file name should be [LOCALE_CODE].po and saved into the /admin/languages/ folder, for example:
- For Polish, save the file as /admin/languages/pl_PL.po
- For Spanish, save the file as /admin/languages/es_ES.po
- For German, save the file as /admin/languages/de_DE.po
When the file loads, you should see the list of text strings needing translated. If you look at the bottom, you should see 2 boxes, one containing the text needing translated and an empty box below it. In the empty box, enter your translation.
You can use the shortcut key Ctrl + Down Arrow to jump to the next translation. If the translation is the same in both languages, you can right-click the string and select Copy original to translation field.
Continue this process until the translation is complete.
Unusual characters combinations (formatting placeholders)
If you have never done a translation before, you may notice some odd looking character combinations, such as
%1$s, these are formatting placeholders and they should remain inside the translated string, in exactly the same position if possible. Also double quotes will have a backslash before them
\" and they should remain this way in your translation.
Finding more information or context of a string
If you need to find out the context of a string so that you can accurately translate it, you can right-click it and under References, click one of the filenames, this will open the file and show where the string appears in the code. You may be able to figure it out from there.
Save the file, Poedit should create another file ending in .mo in the same place as your .po file. So you should have two files that should be in the /languages/ folder, for frontend translations, or in the /admin/languages/ folder for backend translations:
If you haven’t done so already, you should set up WordPress to use your locale. Open the file wp-config.php, found in the WordPress root folder. Find the line that looks like this:
Inside the empty single quotes, enter your WordPress locale, for example:
Once this step has been done, the theme should be translated inside WordPress, congratulations!
Share your translation?
ThemeCatcher invites you to share your translations with others. If you wouldn’t mind contributing to make Storm an even more awesome theme, please send us your translated .mo and .po files to firstname.lastname@example.org. Thanks for contributing 😉