WordPress Theme .pot Language File

I’ve purchased a WordPress theme which has a .pot language file at below path:

    ./wp-content/themes/THEME_NAME/include/languages/THEME_NAME.pot

I’ve translated some phrases by Poedit software and replaced the new .pot file; But it didn’t affect at the result!! All phrases are still in default language!

Read More

Attend that I’ve put the below code to wp-config.php file:

    define('WPLANG', 'language_COUNTRY');

And also the template has an option itself which disables the small Admin Side Translator and enables .pot file to get work for all phrases; and I’ve switched to .pot file here.

I’ve also done some Try&Error on File Name and File Path, but no success. Actually I’ve named it some other things and also some other file extensions and changed the file place:

    ./wp-content/themes/THEME_NAME/include/languages/language_COUNTRY.pot & .po & .mo
    ./wp-content/themes/THEME_NAME/include/languages/THEME_NAME-language_COUNTRY.pot & .po & .mo

    ./wp-content/themes/THEME_NAME/language_COUNTRY.pot & .po & .mo
    ./wp-content/themes/THEME_NAME/THEME_NAME-language_COUNTRY.pot & .po & .mo

    ./wp-content/languages/language_COUNTRY.pot & .po & .mo
    ./wp-content/languages/THEME_NAME-language_COUNTRY.pot & .po & .mo

    ./wp-content/languages/themes/language_COUNTRY.pot & .po & .mo
    ./wp-content/languages/themes/THEME_NAME-language_COUNTRY.pot & .po & .mo

    ./language_COUNTRY.pot & .po & .mo
    ./THEME_NAME-language_COUNTRY.pot & .po & .mo

there is a “load_theme_textdomain” function used in a PHP file at the path below:

    ./wp-content/themes/THEME_NAME/include/function-regist.php

And the the related part of code is:

    // enable theme to support the localization
    add_action('init', 'gdl_word_translation');
    function gdl_word_translation(){
        global $gdl_admin_translator;
        if( $gdl_admin_translator == 'disable' ){
            load_theme_textdomain( 'gdl_back_office', SERVER_PATH . '/include/languages/' );
            load_theme_textdomain( 'gdl_front_end', SERVER_PATH . '/include/languages/' );
        }
    }

Now, What should I do to make it work?!

Related posts

Leave a Reply