summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2006-05-16 07:35:20 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2006-05-16 07:35:20 +0000
commitca197739d9e586e65af023791ebabf1ea6057cd1 (patch)
treef3c16f524942a99f93db2bfcb3f429a8c5741182 /django/utils
parentd9c4af6b37b5c1d6e3afa4db35f4d60af5107c38 (diff)
fixed #1660: added support functions and tags for bidi language support
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py
index a877f60009..0ee09e5b94 100644
--- a/django/utils/translation.py
+++ b/django/utils/translation.py
@@ -212,6 +212,16 @@ def get_language():
from django.conf import settings
return settings.LANGUAGE_CODE
+def get_language_bidi():
+ """
+ Returns selected language's BiDi layout.
+ False = left-to-right layout
+ True = right-to-left layout
+ """
+
+ from django.conf import settings
+ return get_language() in settings.LANGUAGES_BIDI
+
def catalog():
"""
This function returns the current active catalog for further processing.