From a0329d0ae30c41cf03a541bf0236dc81c4098feb Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Tue, 26 Aug 2008 20:08:02 +0000 Subject: [PATCH] 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 --- django/utils/translation/trans_real.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 18a009ddb4..65eac8a62c 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -244,7 +244,9 @@ def get_language_bidi(): 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(): """