mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #5789 -- Changed LocaleMiddleware session variable to '_language'.
The old 'django_language' variable will still be read from in order to migrate users. The backwards-compatability shim will be removed in Django 1.8. Thanks to jdunck for the report and stugots for the initial patch.
This commit is contained in:
committed by
Tim Graham
parent
8e2029f8dd
commit
0d0f4f020a
@@ -302,6 +302,13 @@ Internationalization
|
||||
* The :attr:`django.middleware.locale.LocaleMiddleware.response_redirect_class`
|
||||
attribute allows you to customize the redirects issued by the middleware.
|
||||
|
||||
* The :class:`~django.middleware.locale.LocaleMiddleware` now stores the user's
|
||||
selected language with the session key ``_language``. Previously it was
|
||||
stored with the key ``django_language``, but keys reserved for Django should
|
||||
start with an underscore. For backwards compatibility ``django_language`` is
|
||||
still read from in 1.7. Sessions will be migrated to the new ``_language``
|
||||
key as they are written.
|
||||
|
||||
Management Commands
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user