From 96e37129ba5f11bf71540a1e3c41013d740154be Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Fri, 30 Sep 2005 15:53:36 +0000 Subject: [PATCH] the i18n middleware now stores the chosen language in the request so that view code can know what language is chosen (for example to select the right content field from the model if your model supports multiple languages) git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@744 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/middleware/locale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/middleware/locale.py b/django/middleware/locale.py index becab282ee..35128f7376 100644 --- a/django/middleware/locale.py +++ b/django/middleware/locale.py @@ -34,5 +34,7 @@ class LocaleMiddleware: app = findapp(view_func.__module__) + request.LANGUAGE_CODE = lang + translation.activate(app, lang)