Translation not working


Hi, I'm new to Beans. I translated the file to German, uploaded both po and mo files to my child themes 'lib/languages' folder and put the line

load_child_theme_textdomain( 'tm-beans', get_stylesheet_directory() . '/lib/languages/' );

into my functions.php. It is still showing the english translation on the website. What am I doing wrong? https://ribosear.ch/was-sind-mitochondrien-und-was-machen-diese/

thank you, karen


Hi Karen,

You did right but did you load the translations AFTER the theme setup?:

// add the translations if needed
add_action( 'after_setup_theme', mytheme_child_theme_setup' );

/**
 * Setup the child-theme's translation file
 * @return [type] [description]
 */
function mytheme_child_theme_setup() {
    load_child_theme_textdomain( 'tm-beans', get_stylesheet_directory() . '/lib/languages' );    
}

Write a reply

Login or register to write a reply, it's free!