diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-09-30 15:53:36 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-09-30 15:53:36 +0000 |
| commit | 96e37129ba5f11bf71540a1e3c41013d740154be (patch) | |
| tree | ee3d088ff0c7b455356d01341e8534e19f0b520f | |
| parent | 80e450ee2dff44db06f076f163e29b3119481134 (diff) | |
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
| -rw-r--r-- | django/middleware/locale.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |
