Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django i18n: Common causes for translations not appearing

I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, also they are translated on the messages file, and yes, I remembered to do compilemessages.

What are some common causes for translations not to appear like that?

like image 788
Ram Rachum Avatar asked Feb 24 '10 17:02

Ram Rachum


People also ask

How does Django discover language preferences?

This process relies on the GNU gettext toolset. Once this is done, Django takes care of translating web apps on the fly in each available language, according to users' language preferences.

How do I translate a template in Django?

In Django templates, the translate tag allows you to translate either a constant string or variable content. In fact, you can mark a string to be translated via {{ _("Hello World") }} or {% trans "Hello World" %} .


1 Answers

Maybe the translated strings are marked as fuzzy?

like image 155
Ofri Raviv Avatar answered Sep 28 '22 16:09

Ofri Raviv