summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-06 10:07:45 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-06 10:07:45 +0000
commitb70beda0430fc142874999e52b451865284cd52a (patch)
treebf4169a0d9536ea202731c3700c440544d05155b /django/utils
parentcb09e10eb2634243f25ae61e439a71ca47d98884 (diff)
i18n: added support for the new DEFAULT_CHARSET setting in translators
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py
index a74bd06c71..ba64e76d68 100644
--- a/django/utils/translation.py
+++ b/django/utils/translation.py
@@ -32,14 +32,15 @@ _accepted = {}
class DjangoTranslation(gettext_module.GNUTranslations):
"""
This class sets up the GNUTranslations context with
- regard to output charset. Django allways uses utf-8
- as the output charset.
+ regard to output charset. Django uses a defined
+ DEFAULT_CHARSET as the output charset.
"""
def __init__(self, *args, **kw):
+ from django.conf import settings
gettext_module.GNUTranslations.__init__(self, *args, **kw)
self.__charset = self.charset()
- self.set_output_charset('utf-8')
+ self.set_output_charset(settings.DEFAULT_CHARSET)
self.__app = '?.?.?'
self.__language = '??'