Question

I am using multiple language in mezzanine and it is working fine with its own core templates.But I try to use it in my own templates then it is not working.

I have use all things in proper steps. I have locale folder in which django.po consists of all text which I can translate and there encoded django.mo file.

Buy when I choose other then English Lang. in my browser it does not translate my templates text but change the text of core templates.

I don't know why it does not translate my templates data Because if there are any kind of errors then it must not translate core templates but it does.

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

Thanks.

Was it helpful?

Solution

Does your .po file contain the word "fuzzy"? If so, you might want to read the following article: http://blog.e-shell.org/124, as mentioned in this previous SO question: Django missing translation of some strings. Any idea why?

If that is not the cause of your issue, are you sure you are using the internationalisation template tags appropriately?

First of all, ensure you are loading the relevant 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top