summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-09-30 20:13:41 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-09-30 20:13:41 +0000
commit3049adf4859319a19e6a0f72eb172a13b71aaf06 (patch)
treeab256b1ded7e94789012a1840d042d73adcd2e51
parent64a6eaeb63a582cb6f9090c078fe29fb0660dd57 (diff)
i18n: added a note on request.LANGUAGE_CODE to the i18n documentation
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/translation.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/translation.txt b/docs/translation.txt
index 6d655d9829..95272ae35d 100644
--- a/docs/translation.txt
+++ b/docs/translation.txt
@@ -137,6 +137,14 @@ So the middleware will iterate over that header, ordered by the preference
value. The language with the highest preference that is in the django base
message file directory will be used as the language to present to the user.
+Since the middlware discovers the language based on the request, your app
+might need to know what language is selected (if only to show the flag of
+that language). The selected language is stored by the middleware in the
+request as the LANGUAGE_CODE attribute. So with static translation (when
+you don't use the middlware) the language is in settings.LANGUAGE_CODE, while
+with dynamic translations (when you do use the middleware) it's in
+request.LANGUAGE_CODE.
+
Creating Language Files
=======================