From 02eeb6fa003b5cbe3851ac18392f129d31a1a6bd Mon Sep 17 00:00:00 2001 From: denniskloyn <97915409+denniskloyn@users.noreply.github.com> Date: Tue, 18 Jan 2022 08:52:11 +0000 Subject: [PATCH] Change `MIDDLEWARE_CLASSES` to `MIDDLEWARE` (#8333) The `MIDDLEWARE_CLASSES` setting got changed to `MIDDLEWARE` in [Django 1.10](https://docs.djangoproject.com/en/1.10/topics/http/middleware/). --- docs/topics/internationalization.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/topics/internationalization.md b/docs/topics/internationalization.md index c20cf9e33..267ccdb37 100644 --- a/docs/topics/internationalization.md +++ b/docs/topics/internationalization.md @@ -17,9 +17,9 @@ You can change the default language by using the standard Django `LANGUAGE_CODE` LANGUAGE_CODE = "es-es" -You can turn on per-request language requests by adding `LocalMiddleware` to your `MIDDLEWARE_CLASSES` setting: +You can turn on per-request language requests by adding `LocalMiddleware` to your `MIDDLEWARE` setting: - MIDDLEWARE_CLASSES = [ + MIDDLEWARE = [ ... 'django.middleware.locale.LocaleMiddleware' ] @@ -90,7 +90,7 @@ If you're only translating custom error messages that exist inside your project ## How the language is determined -If you want to allow per-request language preferences you'll need to include `django.middleware.locale.LocaleMiddleware` in your `MIDDLEWARE_CLASSES` setting. +If you want to allow per-request language preferences you'll need to include `django.middleware.locale.LocaleMiddleware` in your `MIDDLEWARE` setting. You can find more information on how the language preference is determined in the [Django documentation][django-language-preference]. For reference, the method is: