E
E
elenapetrova19952019-07-14 17:58:03
Internationalization and localization
elenapetrova1995, 2019-07-14 17:58:03

Template localization does not always work, why?

I am localizing the template into Russian.
Through PoEdit I created a localization file, added to functions.php

add_action( 'after_setup_theme', 'my_theme_setup' );
function my_theme_setup() {
  load_theme_textdomain( 'themename', get_template_directory() . '/lang' );
}

If you change the language of the site in the settings to Russian, then everything works, but not always, a strange situation I no longer know where to dig.
I output the text like this, for example Text from some template files is stupidly not translated, why can this be?
__( 'Knowledge Base, 'themename' )

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