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?

thank you, karen

Edited 2 months, 2 weeks ago by Karen Wegehenkel

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' );       

Edited 1 month, 2 weeks ago by Didou Schol

Write a reply

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