Commits

ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 6a0b8cc

Fixed #4389: be more robust in `get_language_bidi()`. Thanks, arien.

  • Participants
  • Parent commits b685a11

Comments (0)

Files changed (1)

File django/utils/translation/trans_real.py

     True = right-to-left layout
     """
     from django.conf import settings
-    return get_language() in settings.LANGUAGES_BIDI
+    
+    base_lang = get_language().split('-')[0]
+    return base_lang in settings.LANGUAGES_BIDI
 
 def catalog():
     """