Problems with multiple languages ​​on the mezzanine

I use several languages on the mezzanine and it works great with my own core templates. But I try to use it in my own templates, then it does not work .

I use everything in the right steps. I have a locale folder in which django.po consists of all the text that I can translate, and the django.mo file was encoded there.

Buy when I choose another English. in my browser it does not translate the text of the templates, but changes the text of the main templates.

I do not know why it does not translate my template data. Because, if there are any errors, he should not translate the basic templates, but he does.

Please help me sort out my problem, any suggestion will be appreciated.

Thanks.

+4
source share
1 answer

Does your .po file contain the word "fuzzy"? If so, you can read the following article: http://blog.e-shell.org/124 , as mentioned in the previous SO question: Django is missing some line feeds. Any idea why?

If this is not the cause of your problem, are you sure you are using the internationalization template tags appropriately?

First of all, make sure that you load the appropriate template tags at the top of each of your templates:

{% load i18n %} 

Then for any text you want to make translatable:

 {% trans "Insert your text here" %} 

See also: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#internationalization-in-template-code and https://docs.djangoproject.com/en/dev/topics/i18n/ translation / # implementation-notes .

+3
source

All Articles