Problems with child theme translations
-
I have a child theme that works fine. It is based on twentyfourteen, which already is translated to swedish. However, I have customized some of the translations by using poedit. I have uploaded the sv_SE.mo and sv_SE.po files to a folder named languages in the same folder as my child theme. I have also added this code to functions.php:
add_action( 'after_setup_theme', 'my_child_theme_setup' ); function my_child_theme_setup() { load_child_theme_textdomain( 'twentyfourteen-child', get_stylesheet_directory() . '/languages' ); }
Unfortunately, it doesn’t work.
It works fine if I overwrite the language files in the wp-content/languages folder, but these files are replaced every time the parent theme is updated, so I would really prefer to have my translations in the child theme folder.
- The topic ‘Problems with child theme translations’ is closed to new replies.