GavickPro Documentation

Translating your GavernWP-powered WordPress theme

GavernWP fully supports translations. Due to differences resulting from the use of JSON files to generate theme options, a theme’s translation should be done in three places:

The first step is a standard operation described in detail in the WordPress documentation. This article will focus on the two remaining steps.

A typical installation will include an en_US catalog created in the config and options catalogs, which includes JSON configuration files in the English language. To translate a theme into a different language, do the following:

NOTE! You must not change the names of keys in JSON files as they are required for key values to be read correctly and for the framework to function properly.

Using a code fragment from the widgets.json file as an example:

 { 
 "name": "Top widgets",
 "id": "top",
 "description": "Widgets are located under the website header ",
 "before_widget": "<div id=\"%1$s\" class=\"box%2$s\">",
 "after_widget": "</div>",
 "before_title": "<h3 class=\"box-title\">",
 "after_title": "</h3>"
 } 

changes should only be made to the following elements:

By following the above operation, text items will appear in your selected language in the administration panel.

In the event that GavernWP cannot locate a catalog corresponding to the language set in the configuration, files will be loaded by default from the en_US catalog.

Translating your GavernWP-powered WordPress theme 3.005 (60.00%) 2 votes