At first sorry for my English :).
LANGUAGE_CODE setting doesn’t work correctly.
When I configured LANGUAGE_CODE=”mn”, but default language code is “en”.
from django.utils.translation import get_language
print get_language()
>>> en
then I tried to configure LANGUAGES setting
LANGUAGES = (
(“mn”: “Mongolia”),
(“en”: “English”),
)
but still “en”
changed LANGUAGES setting
LANGUAGES = (
(“mn”: “Mongolia”),
(“en-us”: “English”),
)
now it is “mn”
but want above settings
LANGUAGE_CODE = “mn”
LANGUAGES = (
(“mn”: “Mongolia”),
(“en”: “English”),
)
It doesn’t work correctly. Is it BUG ? or something else?
I also tried creating “mn”, “en” locale.
Hope help me. Thanks.
If you haven’t already, be sure to read this specific topic in the Django documentation:
How Django discovers language preference
https://docs.djangoproject.com/en/1.3/topics/i18n/deployment/#how-django-discovers-language-preference
We’re not using Django 1.3 yet, but we are using Django with multiple languages.
The first item to check is to verify the
Accept-LanguageHTTP header being sent by your browser. Use Fiddler or Charles Proxy or similar tool to verify. Sounds like your browser may be sending “en-us” as a language preference.