Translating the Theme
Loyde theme is "translation-ready". This means that it ships with the included translation template file, loyde.pot. .pot file is a template file which contains all translatable phrases from Loyde theme. That file is a necessary precondition for the theme translation. The file is located in languages folder (/wp-content/themes/loyde/languages).
There are multiple ways to transate Loyde. But the two most common are:
Translating Using PoEdit
Steps:
- Download the theme installation file (loyde-x.y.z-installable.zip, where "x.y.z" is version name)
- Extract .zip file to your disk. Let's call this path "path/to/loyde/extracted/folder"
- Download nad install PoEdit
- Start PoEdit and select "Create New Translation"
- Navigate to path path/to/loyde/extracted/folder, and open subfolder /languages. select file loyde.pot
- In the "Translation Language" popup, enter the name of the new langiage for which you're making the translation, e.g. de_DE.pot
- Select each source text phrase and enter the translation
- Save changes. This will create two new files, with extensions .po and .mo
- Upload .po and .mo files to the server, to wp-content/themes/loyde/languages
- On your site, go to WP admin -> Settings -> General and select Site Language (in our example, select Deutsch)
- After that, the website should reflect the new language in both places, in the public-facing content and also in administration.
Note: Make sure to make a copy of the generated .po/.mo files before you update the theme.
Translating using LocoTranslate
Steps:
- Install LocoTranslate. It is a free plugin from wordpress.org, so it can be installed through WP admin -> Plugins -> Add New
- Open LocoTranslate (WP admin -> Loco Translate)
- Check if Loyde is offered under "Active Theme". If not, click "See all themes >>"
- open Loyde for translating
- Click "New language"
- Under "Choose a language" select one of the offered langiages, or enter your own. Under "Choose a location", select languages/loco/themes/loyde-{locale}.po
- Click "Start translating"
- Select each source text phrase and enter the translation
- Save changes. This will create two new files, with extensions .po and .mo. Note: You can download the generated .po and .mo files. But it's not necessary, because they've been already saved to the place where LocoTranslate will use them behind the scenes.