diff --git a/pydotorg/settings/base.py b/pydotorg/settings/base.py index 2c392b355..3674b06e1 100644 --- a/pydotorg/settings/base.py +++ b/pydotorg/settings/base.py @@ -172,6 +172,7 @@ 'pages.middleware.PageFallbackMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 'allauth.account.middleware.AccountMiddleware', + 'django.middleware.locale.LocaleMiddleware' ] AUTH_USER_MODEL = 'users.User' diff --git a/pydotorg/urls.py b/pydotorg/urls.py index 8a70d5790..b02c83f00 100644 --- a/pydotorg/urls.py +++ b/pydotorg/urls.py @@ -73,6 +73,9 @@ # storage migration re_path(r'^m/(?P.*)/$', views.MediaMigrationView.as_view(prefix='media'), name='media_migration_view'), + + # i18n + path('i18n/', include('django.conf.urls.i18n')), ] urlpatterns += staticfiles_urlpatterns()