How can I edit PO translation files?
In our themes you can find POT (Portable Object Template) file for translations in directory ./languages
For example for Guesthouse theme it is ./languages/guesthouse.pot file.
For translation are necessary also files *.po and *.mo with name of ISO language code.
i.e. for German it will be de_DE.po and de_DE.mo
Totally for translate you need to have three files (example for German):
You need to create *.po and *.mo files yourself.
For this may be used tool poEdit.
If you have set it up you can start to create *.po and *.mo files.
Values to this field you can find here: http://translate.sourceforge.net/wiki/l10n/pluralforms
If you have all set up here, click OK and check location to save *.po and *.mo files. It must be the same location in ./language folder where is POT file (eg. /wp-content/themes/directory/languages/) and write correct file name in ISO language code: de_DE in this example.
When you click Save each time is saved with *.po file also the *.mo file.
1. Translation using WPML plugin
If you are using WPML plugin you need to repeat all steps above for each language you want to use.
After creating *.po and *.mo files, you will see in the WPML plugin settings “Theme and plugins localization”:
It is possible that you will see File not found!, but wordpress try to find these files directly in the root folder of theme. Anyway translating will works if you have files in language folder of our theme.
2. Translation without WPML plugin
Here you can find steps to translate you site and admin into language you want, without using WPML.
1. Find translate file for current version of WordPress
- find language you need, for our example folder de_DE/
- go to folder tags/
- choose your WordPress version
2. Download necessary *.mo files
- copy them into folder ./wp-content/languages/
3. Change WPLANG constant in file wp-config.php
- for our example
define('WPLANG', 'de_DE');for German
4. Follow steps above to create *.mo file from *.pot file for Theme
5. That’s all:) WordPress and texts from Theme in front-end are showed in the selected language.
Here is result of our translated text “You are here:”
Note: In our themes is possible to translate only front-end, back-end(admin) is available just in English.