Pregunta

Hey I am relatively new to wordpress and the theme i use is not localized.

I have lines like this

<?php echo comments_number('no comments', '1 comment', '% comments'); ?>

and make it to this

<?php load_theme_textdomain('myLocalization'); echo comments_number(_e('no comments','myLocalization'), '1 comment', '% comments'); ?>

I created a .po file with this page and edited with the programm poedit and make all changes what have to be done in this tutorial http://premium.wpmudev.org/blog/how-to-localize-a-wordpress-theme-and-make-it-translation-ready/

But it didn't work. It will not change the string.

Can you give me a hint, where i make a failure. Has the file named to the theme name?

¿Fue útil?

Solución

If you are using German language, your .po, .mo file name should be de_DE.po, de_DE.mo.

text domain file should be {locale}.po, {locate}.mo. you can get current locale name by following wordpress function.

get_locale()
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top