[Django]-How do I disable default translation values in Django?

6👍

There are several ways to override it

  • set your locale path in LOCALE_PATHS in settings file, this gives your translations higher priority.
  • change the msgid to be different from those used by Django. Then provide translations for languages which will be used. The msgid could be anything plus base string as long as its unique and translator-friendly, for example a namespace prefix: {% trans "my:groups" %}
  • Contextual markers for Django1.3+ , then it looks like {% trans "groups" context "my" %}
👤okm

-1👍

I made more simpler. Instead of setting language like en,fr,ru and else, i add prefix ‘t_’, so i’m using po from dirs like t_en,t_ru,t_fr

Leave a comment