How can I edit PO translation files?
In our themes you can find POT (Portable Object Template) file for translations in theme folder: ./languages
For example for Directory theme it is ./languages/directory.pot file.
For translation are necessary also files *.po and *.mo which names depends on your Language Code and Country Code.
Structure of files names is: LanguageCode_CountryCode.po
The name of files must be the same like WPLANG parameter defined in WordPress config file wp-config.php.
Click here for more information about WPLANG parameter…
i.e. for German translation these files will be named de_DE.po and de_DE.mo
So for translation you need to have finally three files (files below are as example for German translation):
You need to create *.po and *.mo files yourself.
To create these files you can use Poedit tool.
After installation, go to preferences of Poedit via menu File > Preferences and in Editor tab of options select “Automatically compile .mo file on save” to automatically create mo file during saving po file.
After this, you can start translation and create *.po and *.mo files.
1. start with click on the button Create new translation:
2. window to select POT file appears, navigate to .pot file of theme inside ./languages folder and click to open.
3. after opening POT file Translation Language selection appears, choose your language:
4. you can start translate words included in POT file to your language:
5. if you’re done with translation click Save to save po and mo file. Don’t forget to write the same name of file like the WPLANG parameter defined in wp-config.php
After this you would have in theme ./languages folder three files.
1. pot file
2. po file
3. mo file