Opened 16 years ago

Closed 16 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)

i18n_doc_fix.diff (1.0 KB ) - added by Damian 16 years ago.
doc patch

Download all attachments as: .zip

Change History (4)

by Damian, 16 years ago

Attachment: i18n_doc_fix.diff added

doc patch

comment:1 by Simon Greenhill, 16 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Marc Garcia, 16 years ago

Component: UncategorizedDocumentation
Summary: An i18n doc fixDocumentation mistake about use of LANGUAGE_CODE and LANGUAGES
Triage Stage: Ready for checkinUnreviewed

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 Marc Fargas, 16 years ago

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top