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:

  • Using a program like PoEdit or Easy Po.
  • Using WordPress plugin Loco Translate.

Translating Using PoEdit

Steps:

  1. Download the theme installation file (loyde-x.y.z-installable.zip, where "x.y.z" is version name)
  2. Extract .zip file to your disk. Let's call this path "path/to/loyde/extracted/folder"
  3. Download nad install PoEdit
  4. Start PoEdit and select "Create New Translation"
  5. Navigate to path path/to/loyde/extracted/folder, and open subfolder /languages. select file loyde.pot
  6. In the "Translation Language" popup, enter the name of the new langiage for which you're making the translation, e.g. de_DE.pot
  7. Select each source text phrase and enter the translation
  8. Save changes. This will create two new files, with extensions .po and .mo
  9. Upload .po and .mo files to the server, to wp-content/themes/loyde/languages
  10. On your site, go to WP admin -> Settings -> General and select Site Language (in our example, select Deutsch)
  11. 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:

  1. Install LocoTranslate. It is a free plugin from wordpress.org, so it can be installed through WP admin -> Plugins -> Add New
  2. Open LocoTranslate (WP admin -> Loco Translate)
  3. Check if Loyde is offered under "Active Theme". If not, click "See all themes >>"
  4. open Loyde for translating
  5. Click "New language"
  6. 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
  7. Click "Start translating"
  8. Select each source text phrase and enter the translation
  9. 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.