S
S
Sergey Dydaevskiy2018-10-07 00:30:19
Internationalization and localization
Sergey Dydaevskiy, 2018-10-07 00:30:19

WordPress - How to screw language localization into a Cactus child theme?

Greetings friends. I am creating my own child theme for the parent theme Cactus:
https://velathemes.com/cactus-theme/
I can't beat the reason why I can't attach localization to my child theme. Ukrainian is active on the site for development. language in the html markup of the page, the lang tag looks like this:
<html lang="uk" class=" no-svg js no-touch">
Let's say my child theme is called "Child Cactus", and is located in the "child_cactus" folder. Therefore, if you place the code in function.php:

function my_child_theme_locale() {
    load_child_theme_textdomain( 'Child Cactus', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_child_theme_locale' );

And on the child_cactus/languages ​​path, place the child-cactus_uk.po and child-cactus_uk.mo files.
Everything should work and Ukrainian localization should pick up from the child theme, but all my attempts are in vain. Please help, I can't understand everything.
PS. I did not describe all the options that I tried to solve this problem, but believe me, I tested almost everything that I could find on the Internet in the last 3 hours and nothing helped in solving.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question