Author: jacob
Date: 2008-08-26 15:08:02 -0500 (Tue, 26 Aug 2008)
New Revision: 8596
Modified:
django/trunk/django/utils/translation/trans_real.py
Log:
Fixed #4389: be more robust in `get_language_bidi()`. Thanks, arien.
Modified: django/trunk/django/utils/translation/trans_real.py
===================================================================
--- django/trunk/django/utils/translation/trans_real.py 2008-08-26 19:59:54 UTC
(rev 8595)
+++ django/trunk/django/utils/translation/trans_real.py 2008-08-26 20:08:02 UTC
(rev 8596)
@@ -244,7 +244,9 @@
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():
"""
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---