From 23229061fcb836ecca2195cc75f91e331279a5d1 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 5 Apr 2013 13:08:50 +0200 Subject: [PATCH] Removed LocaleMiddleware from settings template. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was added in 3f1c7b70537330435e2ec2fca9550f7b7fa4372e. Single language sites should always be translated in LANGUAGE_CODE, regardless of the browser's Accept-Language. Having LocaleMiddleware enabled can result in having some parts, like the admin, translated in an unexpected language, typically if someone browses a non-English website on a system set up in English. Since most websites won't be translated in multiple languages — especially at the time they're created — it's better not to enable LocaleMiddleware by default. Thanks Ramiro for the feedback. --- django/conf/project_template/project_name/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django/conf/project_template/project_name/settings.py b/django/conf/project_template/project_name/settings.py index 972065467f..efe8091e81 100644 --- a/django/conf/project_template/project_name/settings.py +++ b/django/conf/project_template/project_name/settings.py @@ -40,7 +40,6 @@ INSTALLED_APPS = ( MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',