We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 693bb8e commit 7760a37Copy full SHA for 7760a37
1 file changed
babeldjango/templatetags/babel.py
@@ -13,6 +13,7 @@
13
14
from django.conf import settings
15
from django.template import Library
16
+from django.utils.translation import to_locale
17
try:
18
from pytz import timezone
19
except ImportError:
@@ -29,7 +30,7 @@
29
30
def _get_format():
31
locale = get_current_locale()
32
if not locale:
- locale = Locale.parse(settings.LANGUAGE_CODE)
33
+ locale = Locale.parse(to_locale(settings.LANGUAGE_CODE))
34
if timezone:
35
tzinfo = timezone(settings.TIME_ZONE)
36
else:
0 commit comments