summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-12 14:55:03 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-12 14:55:03 +0000
commit18d0c31d51d52ca4515e3a16b20c75c3de229995 (patch)
tree7bc9f19ddaa34773f0f54dd578269717fdd08260
parent176c4545f626f74d34cb441c5f254d09dd63eb91 (diff)
i18n: LANGUAGE_CODE in DjangoContext is now language-SUBLANGUAGE instead of language_SUBLANGUAGE (was introduced by [848])
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/extensions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/extensions.py b/django/core/extensions.py
index e9947f0c6e..591e7ad740 100644
--- a/django/core/extensions.py
+++ b/django/core/extensions.py
@@ -37,9 +37,9 @@ class DjangoContext(Context):
from django.conf import settings
self['LANGUAGES'] = settings.LANGUAGES
if hasattr(request, 'LANGUAGE_CODE'):
- self['LANGUAGE_CODE'] = request.LANGUAGE_CODE
+ self['LANGUAGE_CODE'] = request.LANGUAGE_CODE.replace('_', '-')
else:
- self['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
+ self['LANGUAGE_CODE'] = settings.LANGUAGE_CODE.replace('_', '-')
if DEBUG and request.META.get('REMOTE_ADDR') in INTERNAL_IPS:
self['debug'] = True
from django.core import db