How to translate a theme?
The theme translation is located in "/languages/" folder. The file is called "THEME_NAME.po" and you can open it with PoEdit application: https://poedit.net/
Here are the steps:
1. Open Poedit and select File > New Catalog from POT / PO file
2. Select the .POT file or the .PO file from the theme or plugin you wish to translate which (you can find the files in the wp-content/themes/weeklynews/languages/ folder).
3. A box will pop up asking for language of the translation. Select your language:
4. Hit OK and Poedit will name automatically your file. If you select Spanish (Spain): es_ES.po
5. Save your file in your computer
6. Now you can start translating your theme or your plugin. The space at the top will display all the text ready to translate, and any completed translations will display to the right. The boxes underneath show the source text, your translation and any notes for translators. Translating is really easy – just select a word or phrase, enter your translation and click “Validate”.
- You have to respect all special characters from the original text when translating (look at the screen capture)
- It´s not necessary translate all text strings. Perhaps you don´t want to spend your time translating text strings of the admin theme.
7. When you’ve finished, save your file. Poedit will automatically create both .po and .mo files. You´ll have to upload both to your theme’s languages folder.