Translation

Inside the Dejure Main theme files wp-content/themes/dejure/lang , You will find default.po and default.mo files. The .po file is basically a list of all the text strings used in the theme files in English language, The .mo file is just the compiled export from the .po file and is used by WordPress to translate the theme. Unfortunately for now you need to translate the files manually, after you translate them you need to save the translation file with your language code, e.g: fr_FR.po or nl_NL.po (for more info see here: http://www.w3schools.com/tags/ref_language_codes.asp)

In WordPress 4.0 or above you just need to change your main language in Setting > General from your admin panel area to make your WordPress load the po files.

So this is the full step of translating the theme using poedit:

1. Get Poedit

There are different editors out there for the purpose of editing .po files, but POEdit is easy to use, it is available for all platforms and it is freeware. You can get it here: http://www.poedit.net


 

2. Start translating

  1. Go to your theme files installation and navigate to wp-content > themes > dejure > includes > lang.
  2. Open default.po using poedit.
  3. Choose the line you want to translate and then check the lower part of the POEdit window where you will find a textarea to add the correct translation.
  4. When you are done translating all needed strings save the file with your language code, for example: de_DE.po. The corresponding .mo file will be auto created. Make you save the file in the previous “lang” folder.

3. Updating The Translations Catalogue

  1. You will need to do this when new strings included after theme’s update. By doing this the poedit will register new strings to your previously translated .po file, so you dont need to do it again from scratch.
  2. After you updated the theme to the new version go to your theme files installation and navigate to wp-content > themes > dejure > includes > lang. .
  3. Open default.po using poedit.
  4. Find update button on the top of the software windows and save your file after you translated the new strings.

Initial Setup

We’ve worked directly with the WPML team to make Dejure Theme compatible with the popular WPML plugin. Below you will find documentation their team created for using WPML plugin with our theme. If you’ve purchased WPML and have any questions or issues, please check the links below.

You can purchase WPML plugin directly at http://wpml.org/purchase

After purchasing the license, Install and activate the core WPML plugins (WPML Multilingual CMS, WPML String Translation, WPML Translation Management), and then other WPML plugins that may depend on them.

Set up WPML from WPML >Languages. See WPML Getting Started Guide for complete reference, but the initial simple three-step setup is self-explanatory, asking you to choose your default language, a set of active languages, and a language selector.

To make sure all theme’s strings are listed please navigate to WPML > Theme & Plugin Localization and scan the theme for strings there.

(image)

To translate the theme, you can navigate to WPML > String Translation. If you want to translate the front end parts you can choose ‘theme dahztheme’ context. For backend strings you can translate ‘theme backend_dahztheme’. Don’t forget to mark the translation as complete after you translated it.

(image)

More about this can be read here

http://wpml.org/documentation/getting-started-guide/string-translation

There, that was easy, wasn’t it? Happy translating!

Dejure is tested with WP v. 4.1.1 and WPML v 3.1.8.4.

 

We need your Feedback, please upvote if you like this post.