mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user