0

This question already has an answer here:

I finished translating the .pot file(larehev.pot) and created a .mo file(larehev_he.mo) with my translation and i can't make it to work on my theme.

in functions.php there is a setup function and i changed

load_theme_textdomain( 'larehev', get_template_directory() . '/languages' );

to

load_theme_textdomain( 'larehev_he', get_template_directory() . '/languages' );

Any idea whats the problem? where else i need to change?
I'm using the underscores starter theme.

marked as duplicate by Pieter Goosen, fuxia Dec 31 '14 at 11:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Please note how the translation works: The Text Domain should be same in all the places of your theme.

On this page you can see the Theme's text domain setup:

load_theme_textdomain( '_s', get_template_directory() . '/languages' );

And on this page (and many in this theme), you can see the implementation of the Text Domain:

_e( 'Nothing Found', '_s' );

In both the cases the Text Domain is _s. If you change the Theme Text Domain in functions.php then you have to change them in all the other places in your theme. An easier way to do this is to search for a quoted keyword like '_s' and replace it with your desired quoted keyword 'larehev_he' in all the files of the theme.

Note: there's another place (style.css) where the Text Domain is mentioned:

Text Domain: _s

Make changes there too. So then it should work. :)

  • i started chaching all the names and half way i checked if it working and still nothing. my question is how i activate my translation. – Ron Kantor Jan 2 '15 at 16:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.