summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/dates.py4
-rw-r--r--django/utils/translation.py10
2 files changed, 12 insertions, 2 deletions
diff --git a/django/utils/dates.py b/django/utils/dates.py
index 12fb7b2b76..111f32e4fc 100644
--- a/django/utils/dates.py
+++ b/django/utils/dates.py
@@ -16,8 +16,8 @@ MONTHS = {
12:_('December')
}
MONTHS_3 = {
- 1:'jan', 2:'feb', 3:'mar', 4:'apr', 5:'may', 6:'jun', 7:'jul', 8:'aug',
- 9:'sep', 10:'oct', 11:'nov', 12:'dec'
+ 1:_('jan'), 2:_('feb'), 3:_('mar'), 4:_('apr'), 5:_('may'), 6:_('jun'),
+ 7:_('jul'), 8:_('aug'), 9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec')
}
MONTHS_3_REV = {
'jan':1, 'feb':2, 'mar':3, 'apr':4, 'may':5, 'jun':6, 'jul':7, 'aug':8,
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.