#16764: LANGUAGES and LANGUAGE_CODE settings doesn't work correctly
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: gaba
Type: Bug | Status: closed
Milestone: | Component:
Version: 1.3 | Internationalization
Resolution: fixed | Severity: Normal
Triage Stage: Accepted | Keywords: language settings
Needs documentation: 0 | Has patch: 0
Patch needs improvement: 0 | Needs tests: 0
UI/UX: 0 | Easy pickings: 0
-------------------------------------+-------------------------------------
Changes (by gabelula@…):
* status: new => closed
* resolution: => fixed
* stage: Unreviewed => Accepted
Comment:
If you use the locale middleware did you check if your browser is not set
up for english version or you have a cookie setup?
Check this:
"LocaleMiddleware tries to determine the user’s language preference by
following this algorithm:
First, it looks for a django_language key in the current user’s session.
Failing that, it looks for a cookie.
Failing that, it looks at the Accept-Language HTTP header. This header is
sent by your browser and tells the server which language(s) you prefer, in
order by priority. Django tries each language in the header until it finds
one with available translations.
Failing that, it uses the global LANGUAGE_CODE setting."
on http://www.djangobook.com/en/2.0/chapter19/
en_US does not have a language translation in django so is not gonna be
used in your application. Adding en_US to the languages is the same as not
adding anything. As you can see if you only have 'mn' in your languages
then it will only get the mongolian version of the site. If you have your
browser setup to mongolian and you have en and mn in the languages then
the site will be in mongolian.
Please, let me know if this resolves the issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/16764#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.