mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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
This commit is contained in:
@@ -34,5 +34,7 @@ class LocaleMiddleware:
|
||||
|
||||
app = findapp(view_func.__module__)
|
||||
|
||||
request.LANGUAGE_CODE = lang
|
||||
|
||||
translation.activate(app, lang)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user