Translating the theme
How to translate the theme
There are several ways to translate the theme. The easiest way is to use plugins such as Loco translate or WPML, since everything can be done within the WordPress dashboard, there’s no need to deal with renaming the files and file uploads. Using Poedit software is the other way to do that, but it’ll take several more steps compared to using a plugin, we’ll explain that in this article.
Changing the default language
- Go to Settings > General page
- Change the Site Language option to the preferred language
- Click on Save Changes button
Using Loco Translate Plugin
Now we’ll explain another method of the translation process using the Loco Translate plugin. This plugin is free and an excellent tool for translation management.
Install Loco Translate Plugin
- Go to Plugins > Add New page.
- Search for Loco Translate and click Install Now.
- Click on Activate when installation is done.
Translating The Theme Strings
- Go to Loco Translate > Themes page.
- Click on Benelux from the theme list.
- Click on New Language from Themes / Benelux page.
- In the new language configuration section, select your language from the Choose a language field, and choose languages/loco/themes/*.po or languages/themes/*.po path in Choose a location section, and then click on Start translating.
- In the translation editor page, search for a string you want to translate and type its translation in your language under the translation section. Do the same for other strings and then click on Save.
- Go to Settings > General page and select your Site Language, click Save Changes and check the result.
Note: If you noticed some translations are not working as expected after theme update, click on the Sync button in the translation edit screen. This option will sync the old translations with new translations.
Using Poedit Software
- Download and install Poedit translation editor.
- Open POEdit and click Create new translation.
- Select the benelux.pot file from the languages folder within the theme folder ( benelux/languages/ ) and click Open.
- Select a translation language from the popup window.( e.g. German (Germany) )
- Translate all the strings in the list and save the .po file without altering the file name.
- Upload these files (.po and .mo) to wp-content/languages/themes folder on your server. That’s it!
Translating Spirit Framework Plugin
Some of the texts are included in the Spirit Framework plugin. e.g. texts in Login & Registration forms. To translate the plugin, please follow the same steps described above with exceptions in below steps:
- Go to Loco Translate > Plugins page.
- Click on Spirit Framework from the plugin list.
- Select the spirit.pot file from the languages folder within the plugin folder ( spirit-framework/languages/ ) and click Open.
- Upload these files (.po and .mo) to wp-content/languages/plugins folder on your server. That’s it!
For multilingual sites, we recommend to use plugins like WPML or Polylang. These plugins are well-known solutions for multilingual websites and it’s popular among WordPress users. Benelux theme is compatible with these plugins.