• Resolved frances2823

    (@frances2823)


    Hello,

    can you help me for a translation mistake.
    I use bootstrap-classic with a child theme and a french version of WordPress.

    I guess I have to put the translation new files in my child theme, but in my case it doesn’t work.

    I put this in my functions.php :

    /**
     * Loads the child theme textdomain.
     */
    function wpdocs_child_theme_setup() {
        load_child_theme_textdomain( 'bootstrap-basic', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'wpdocs_child_theme_setup' );

    and put a fr_FR.po in a languages folder in my child theme.
    I’ve translate some strings from default.po with poedit.
    But I don’t see any changes.

    Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author vee

    (@okvee)

    I use this code.

    if (!function_exists('wimuttiAfterSetupTheme')) {
        function wimuttiAfterSetupTheme()
        {
            load_theme_textdomain('bootstrap-basic', get_stylesheet_directory() . '/languages/parent-theme');
            load_theme_textdomain('wimutti', get_stylesheet_directory() . '/languages');
        }// wimuttiAfterSetupTheme
    }
    add_action('after_setup_theme', 'wimuttiAfterSetupTheme');

    My translation file is in Thai language. (th.po & th.mo)
    Please make sure that your translation file name is match the locale. (In my case the locale is th.)
    And please make sure that you put translation file into correcy folder or directory.

    Theme Author vee

    (@okvee)

    Hello,

    Does my answer solved your problem?

    Thread Starter frances2823

    (@frances2823)

    Yes, thanks a lot, it works now ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation’ is closed to new replies.