django internationalization doesn't work
Posted
by xRobot
on Stack Overflow
See other posts from Stack Overflow
or by xRobot
Published on 2010-05-09T09:32:31Z
Indexed on
2010/05/09
9:38 UTC
Read the original article
Hit count: 600
django
I have:
* created translation strings in the template and in the application view.
* run this command: django-admin.py makemessages -l it and the file it/LC_MESSAGES/django.po has been created
* translated strings in the django.po file.
* run this command: django-admin.py compilemessages and I receive: processing file django.po in /home/jobber/Desktop/library/books/locale/it/LC_MESSAGES
* set this in settings.py:
LANGUAGE_CODE = 'it'
TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media", )
USE_I18N = True
MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
but.... translation doesn't work !! I always see english text. Why ?
© Stack Overflow or respective owner