Opened 17 years ago
Closed 17 years ago
#7450 closed (invalid)
Documentation mistake about use of LANGUAGE_CODE and LANGUAGES
Reported by: | Damian | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | docs | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I18n docs say:
If all you want to do is run Django with your native language, and a language file is available for your language, all you need to do is set LANGUAGE_CODE.
This didn't work for me, and I got confused until I understood that several lines later there is a notion that LANGUAGES setting must be added.
I think it will be useful if the docs state the necessity of setting LANGUAGES in the first place.
Attachments (1)
Change History (4)
by , 17 years ago
Attachment: | i18n_doc_fix.diff added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 17 years ago
Component: | Uncategorized → Documentation |
---|---|
Summary: | An i18n doc fix → Documentation mistake about use of LANGUAGE_CODE and LANGUAGES |
Triage Stage: | Ready for checkin → Unreviewed |
Sorry for reverting the triage stage, but I can't see any problem when following documentation. It works perfectly when setting just LANGUAGE_CODE and not LANGUAGES.
Could you explain exactly why it didn't work for you, and what exactly is the problem, please?
comment:3 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The issue is documented a bit below:
Only languages listed in the LANGUAGES setting can be selected. If you want to restrict the language selection to a subset of provided languages (because your application doesn’t provide all those languages), set LANGUAGES to a list of languages. For example:
A bit above there's another important part that explains HOW Django selects the language presented to the user. So, if you set LANGUAGE_CODE to "de" but your visitor (or yourself) send "en" as a requested language Django will answer in English.
So, that is already documented, you just need to read the whole document and interpret it, you'll see that LANGUAGE_CODE is the *last* thing that Django cares about when selecting the language.
doc patch