Method 1: Loco Translate Plugin
Method 2: PoEdit Software
Method 3: Multilingual Website
Method 1: Loco Translate Plugin
The easiest way to translate the theme is to use the Loco Translate plugin.
- Go to Settings → General and set the Site Language to your language.
- Go to Loco Translate
- Select Your Theme from the Active theme section.
- Click on New language and start translating the theme.
- In the Choose a language section choose your language.
- In Choose a location select Custom, then click Start Translating.
- Select any of the strings in Source text list.
- If you can’t find a specific string, use the search tool Filter translation.
- Scroll down and type the translated version into translation area.
- Click Save.
Method 2: PoEdit
- Go to Settings → General and set the Site Language to your language.
- Download Poedit, which is a free, open source tool.
- Look for the amaya.pot file, which is included in your theme files (in the subfolder “languages”) and open it with Poedit.
- Click Create New Translation, select your language and click OK
- You should see a list of all strings (in English) used in the theme. Go through the list and click on the text that you want to translate. When you click a line of text, the same text will appear at the upper of the 2 boxes at the bottom. Enter the translation for the text in the lower box.
- If you right-click on any line, you’ll see a file name and line number like “archive.php line 71″. That is the place in the theme files where this text is being used.
- If you are looking for a certain text that you want to translate, click Edit → Find .
- In Poedit → Preferences → Editing, make sure Automatically compile MO file when saving is checked. That way, when you click File → Save as, it will automatically output a .po and .mo file. The naming of your .po and .mo files is important. The naming convention is based on the language code (e.g. pt for Portuguese) followed by the country code (e.g. _PT for Portugal or _BR for Brazil). So, the Brazilian Portuguese files would be called pt_BR.po and pt_BR.mo. A complete list of codes can be found at language codes and country codes. Save the translation files in the same folder as the coffeebean.pot file.
You can always open your .po file again (in Poedit) and add translations.
Multilingual Website
If you wish to display your website in multiple languages, we recommend using the Polylang plugin. Translate all pages, posts, navigation menus, online shop and everything else on your site into multiple languages.