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 baby kids theme you have to download the poedit (a free translations editor) and translate the file default.po located in the folder languages. Please check the video at the end of the page.
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.
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.
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 Baby Kids 2.0 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.0 you must enter the following code in the file functions.php ( after: $themename = “babykids”; ):
load_theme_textdomain( 'babykids', 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.
Follow the video tutorials to learn how to use poedit.