Usually, WordPress themes that are translatable contain a “languages” or “lang” folder where you will find a default.po or a themename.pot file.

To use this file and translate a theme, you will need poedit software.

Set your language in your WordPress Installation

There is two options to set your language in your wordpress installation

1. In your child theme (recommended)

In most of our theme packages, you will find a child theme template. It is recommended to use it if you want to add your own translation file.

To set your language, simply add the following function in your child theme functions.php file. (or edit it if it’s already there)

2. Or in your wp-config.php file

Open wp-config.php at the root of your wordpress installation and set your language code in the WPLANG constant (should be around row 73):
e.g with German

define( 'WPLANG', 'de_DE' );

Translate your file with poedit

You will need poedit to edit your translation files. You will find the template/default translation file in the languages folder of the theme.

1. From a .pot file

A .pot file is a translation template file. To create your translation file from it, open Poedit, go in file -> new from POT file, and use the .pot file provided in your plugin or theme folder.

You will be able to translate each string in your own language. Simply select the expressions one by one and fill the “Translation” field for each. Don’t forget to save your file after modifications.

 

2015-05-19_15h53_45

 

2. Or from a default.po file

If a .po file is provided, duplicate the main .po file (e.g: default.po) from the “languages” or “lang” folder and rename it with your desired language code.
eg: de_DE.po

Now, open your new file with poedit (de_DE.po in this exemple) and start your translation

More tools

To translate your theme you can also use WPML plugin.

 

Note:

If you use one of our plugins, you need to translate it using the .pot file included in the “lang” folder and name your translation file with the “wolf-plugin-name-” prefix.

e.g : wolf-page-builder-fr_FR.po