AIM:
I'd like to translate certain words in the parent theme in the translation files that are protected from updates to the parent theme.
APPROACH:
I have saved a .po and .mo file in wp-content/themes/child-theme-name/languages/
that has the translated words.
I have amended the child functions.php with the following:
function my_child_theme_locale() {
load_child_theme_textdomain( 'total', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_child_theme_locale' , 42 );
I also tried this:
add_action("after_setup_theme", function () {
load_theme_textdomain( 'rookie', get_stylesheet_directory() . '/languages' );
}, 5);
Neither had any impact! the translations only show when I save the .mo and .po file in the folder wp-content/languages/themes
but here they are not save from updates, so it's not viable.
Could someone help me how to get the translation files to work in a update-save manner?
Thanks a lot!