From c63aae3cff0b8fec03c0b4c31d43830863ee5772 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Mon, 17 Oct 2005 19:45:56 +0000 Subject: [PATCH] i18n: added hint on order for locale middleware git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@916 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/translation.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/translation.txt b/docs/translation.txt index 534563b881..6339ab44dc 100644 --- a/docs/translation.txt +++ b/docs/translation.txt @@ -182,7 +182,10 @@ want to have a single translation active, you want to decide what language to present to each and every user. This is where the LocaleMiddleware comes into the picture. You need to add it to your middleware setting. It should be one of the first middlewares installed, but it should come after the -session middleware - that's because it makes uses of the session data. +session middleware - that's because it makes uses of the session data. And +it must be installed before the AdminUserRequired middleware, as that will +do redirects based on not-logged-in state and so the LocaleMiddleware won't +ever see the login page (and so not initialize the language correctly). So your middleware settings might look like this::