diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 9f33fd7dec..a23c6d7edc 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -26,13 +26,17 @@ TIME_ZONE = 'America/Chicago' # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes # http://blogs.law.harvard.edu/tech/stories/storyReader$15 -LANGUAGE_CODE = 'en-us' +# Language codes need to be given in locale format, not in HTML language +# format. So it's en_US and not en-us to store here. The HTML language +# is stored in the request.LANGUAGE_CODE variable and will depend on the +# users browser. +LANGUAGE_CODE = 'en' # Languages we provide translations for out of the base. The # language name should be the utf-8 encoded local name for the # language. LANGUAGES = ( - ('en-us', 'English'), + ('en', 'English'), ('de', 'Deutsch'), ('it', 'Italiano'), ('sr', 'Srpski'), diff --git a/django/conf/project_template/settings/admin.py b/django/conf/project_template/settings/admin.py index 603886a5f2..0f89c08029 100644 --- a/django/conf/project_template/settings/admin.py +++ b/django/conf/project_template/settings/admin.py @@ -10,6 +10,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.sessions.SessionMiddleware', 'django.middleware.admin.AdminUserRequired', 'django.middleware.common.CommonMiddleware', + 'django.middleware.locale.LocaleMiddleware', ) # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a diff --git a/django/conf/project_template/settings/main.py b/django/conf/project_template/settings/main.py index cbb32b7920..572b9842ef 100644 --- a/django/conf/project_template/settings/main.py +++ b/django/conf/project_template/settings/main.py @@ -8,7 +8,7 @@ ADMINS = ( MANAGERS = ADMINS -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'en_US' DATABASE_ENGINE = 'postgresql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = '' # Or path to database file if using sqlite3.