NEW HOTEL WORDPRESS THEME

VIEW DEMO

Translations with .po

In this article I will explain how to translate the strings of the theme and the strings of our plugin “nicdark-shortcodes”.

HOW TO TRANSLATE THE THEME?

To translate the Sweet Cake theme you have to download the poedit (a free translations editor) and translate the file default.po located in the languages folder. Please check the video at the end of the page (even if it is another issue because the process is the same).

 

THEME
folder: ../wp-content/themes/sweetcake/languages
name: it_IT.po

HOW TO TRANSLATE THE PLUGIN?

To translate the plugin you have to create your translation files as you did for the theme. Open the file default.po in the languages folder and create your translation file in ..\wp-content\plugins\nicdark-shortcodes\languages.

 

PLUGIN
folder: ..\wp-content\plugins\nicdark-shortcodes\languages\
name: nicdark-shortcodes-it_IT.po

 

IMPORTANT: remember to save the file name by entering the name of the plugin, for example for the Italian language my file must be called in this way: nicdark-shortcodes-it_IT.po. Here the list of all code country.

DOESN’T WORK?

We have detected a problem in translation with the new version of wordpress 4.3 for this reason we have included in the new version of the theme Sweet Cake a line of code in the functions.php file that makes the translation works. For this reason, if you do not have the new version 2.4 you must enter the following code in the file functions.php ( after: $themename = “sweetcake”; ):

load_theme_textdomain( 'sweetcake', get_template_directory().'/languages' );

It may be that some parts of the theme in versions prior to 2.0 can not be translated, in this case you should update the theme, here all informations about update procedure.

VIDEO TUTORIAL

Follow the video tutorials to learn how to use poedit.

Copyright 2016 Clean Themes Studio - PI 04892530280