Hi, I'm trying to use i18n with django. I followed the docs and
created my transalations for english,italian and spanish

in settings I have:

ugettext = lambda s: s

LANGUAGES = (
    ('en', ugettext('English')),
    ('it', ugettext('Italian')),
    ('es', ugettext('Spanish')),
)

and I installed the locale middleware

MIDDLEWARE_CLASSES = (
    'django.contrib.csrf.middleware.CsrfMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.doc.XViewMiddleware',
)

If I change the settings:

LANGUAGE_CODE

all is fine both javascript and coded string are correctly transalted.

If I comment LANGUAGE_CODE settings and change the browser language
preference only javascript is correctly translated. I have the same
issue if I change

request.LANGUAGE_CODE

or

request.session[settings.LANGUAGE_COOKIE_NAME]

so the problem seems related to locale middleware.

Someone with the same issue? Is this a django bug or a my
misconfiguration?

thanks
drakkan1000
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to