summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-11-12 21:33:46 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-11-12 21:33:46 +0000
commit33accf560d9a8a318a34fc6a38c038f2d86165ff (patch)
treea25eb5e16f67157e016e10e354f242d1ba444905
parent5f39a6a240e4c23a4d8f6a05e10eb64d3a08f05e (diff)
downloaddjango-33accf560d9a8a318a34fc6a38c038f2d86165ff.tar.gz
updated i18n documentation for the LANGUAGES setting
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/i18n.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/i18n.txt b/docs/i18n.txt
index 8ab9a1f2cb..3ed95007fc 100644
--- a/docs/i18n.txt
+++ b/docs/i18n.txt
@@ -426,6 +426,18 @@ Notes:
Django uses the base language. For example, if a user specifies ``de-at``
(Austrian German) but Django only has ``de`` available, Django uses
``de``.
+ * only languages listed in the LANGUAGES setting can be selected. So if you want
+ to restrict the language selection to a subset of provided languages (because
+ your appliaction doesn't provide all those languages), just set it to a list
+ of languages like this::
+
+ LANGUAGES = (
+ ('de', _('German')),
+ ('en', _('English')),
+ )
+
+ This would restrict the available languages for automatic selection to German
+ and English (and any sublanguage of those, like de-ch or en-us).
Once ``LocaleMiddleware`` determines the user's preference, it makes this
preference available as ``request.LANGUAGE_CODE`` for each `request object`_.