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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2008-08-26 20:08:02 +00:00
parent 52c3c3a349
commit a0329d0ae3
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,9 @@ def get_language_bidi():
True = right-to-left layout True = right-to-left layout
""" """
from django.conf import settings 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(): def catalog():
""" """