On Mon, 26 Jul 2010 03:46:10 +0200, Lachlan Musicman <data...@gmail.com>
wrote:
On Mon, Jul 26, 2010 at 11:16, Martin Tiršel <dja...@blackpage.eu> wrote:
Gah, my eyes were closed.
Have you also added the appropriate Middleware product?
As you see here:
http://docs.djangoproject.com/en/dev/topics/i18n/deployment/#topics-i18n-deployment
you
need to have soemthing like the following:
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',)
remember that order is important - that doc page has more info
Hi,
yes, I have correct middlewares installed.
I printed some debug informations into template and LANGUAGE_CODE was set
to 'sk' (at this point I sure had somewhere a bug, possibly not compiled
translation I accidentaly deleted), but when I checked it now, there was
'en'. LocaleMiddleware takes the language code first from session, then
cookie, THEN Accept-Language from HTTP and if it all fails, then from
settings. But my browsers are set to 'en' and that was the "problem".
So, if I want to specify only single language in settings.py, I have to
REMOVE 'django.middleware.locale.LocaleMiddleware' from middlewares, else
settings.LANGUAGE_CODE is ignored (AFAIK today every browser sends
Accept-Language).
Martin
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@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.