Translate your Theme
In each of our themes and plugins, you will find a “languages” folder including a themename.pot or a pluginname.pot file.
A .pot file is a template containing all translatable strings that you can use to translate your theme or your plugin in any language and generate the .po and .mo files that will be used by WordPress to display the translation.
To use this template file, you can use Loco Translate plugin. This plugin allows you to translate all strings directly into your admin panel.
You can also use Poedit software to translate the theme from the .pot file, but you will have to upload the files manually to your server every time you update your translation.
First of all, you must set your language in the WordPress settings.
Set your Language in your WordPress Installation
To set a language for your site, navigate to “Settings” > “General” and select your language at the bottom of the page.
Translate your Theme with Loco Translate
- Install and activate Loco Translate in your WordPress installation.
- Navigate to “Loco Translate” > “Themes” (or “Plugins”) and select the theme (or plugin) you want to translate.
- In the “Overview” tab, click on “New language” or select an existing language if the translation isn’t completed.
- Simply select the expressions one by one and fill the “Translation” field for each. Don’t forget to save your file after modifications.
Please help us adding new translations or improving an existing translation by sending us your po and mo files to firstname.lastname@example.org. It will be much appreciated!
Translate your Theme with Poedit
To create your translation files, open Poedit, go to “File” > “New from POT file”, and select the .pot file provided in your plugin or theme folder.
You will be able to translate each string in your own language.
For a theme, the translation files must be named fr_FR.po and fr_FR.mo for a french translation or de_DE.po and de_DE.mo for a german translation.
Replace the language code by your own. You can browse the WordPress language code list to find the appropriate code for your language.
For a plugin, the translation files must be named wolf-plugin-slug-fr_FR.po and wolf-plugin-slug-fr_FR.mo. Replace the plugin slug and the language code to suit your needs.
To translate your theme you can also use WPML plugin (premium) if you need a multi-language website.