Answer the question
In order to leave comments, you need to log in
How to link translation file in wordpress child theme?
Greetings! I want to bind a localized Russian translation of a theme in a wordpress child theme. If I put the translation files in the parent theme's lang folder along with the English version, then everything is ok, but when the theme is updated, my translation will disappear and I will have to overwrite it every time. In the child theme, I create a similar folder, but by default, the translation from it is not picked up.
I try to bind via the child theme's functions.php file, but it doesn't work:
function my_child_theme_setup() {
load_child_theme_textdomain( 'my-child-theme', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_child_theme_setup' );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question