mirror of
https://github.com/django/django.git
synced 2025-09-13 22:16:28 +00:00
Fixed #24073 -- Returned None for get_language when translations are deactivated
This fixes a regression caused by f7c287fca9
. Thanks Markus Holtermann
for identifying the regression.
This commit is contained in:
parent
d6c8121ed0
commit
543df07720
5 changed files with 19 additions and 8 deletions
|
@ -1098,7 +1098,14 @@ For a complete discussion on the usage of the following see the
|
|||
|
||||
.. function:: get_language()
|
||||
|
||||
Returns the currently selected language code.
|
||||
Returns the currently selected language code. Returns ``None`` if
|
||||
translations are temporarily deactivated (by :func:`deactivate_all()` or
|
||||
when ``None`` is passed to :func:`override()`).
|
||||
|
||||
.. versionchanged:: 1.8
|
||||
|
||||
Before Django 1.8, ``get_language()`` always returned
|
||||
:setting:`LANGUAGE_CODE` when translations were deactivated.
|
||||
|
||||
.. function:: get_language_bidi()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue