L
L
ligisayan2016-01-17 18:03:31
PHP
ligisayan, 2016-01-17 18:03:31

Why is localization not applied in wordpress child theme?

Site on wordpress. I created a localized translation of the theme, I want to place it in the lang child theme folder. I do everything in accordance with the manual at the link . In the child theme functions.php I write:

/**
 * Child theme language
 */
function my_child_theme_setup() {
    $path = get_stylesheet_directory() . '/lang';
    var_dump($path);
    load_child_theme_textdomain( 'child_theme_language', $path );
}
add_action( 'after_setup_theme', 'my_child_theme_setup' );

But localization doesn't work... var_dump outputs string(67) "/hosting/home/ domen /public_html/wp-content/themes/bolid-child/lang" if you throw them in a similar way to the parent theme - everything works. What is the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-01-17
@ligisayan

Move the translation files to the /wp-content/languages/themes/ directory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question