Missing support of locale for i18n
There are a few things we should add by default for every types of application in my opinion:
In middleware, please add 'django.middleware.locale.LocaleMiddleware',
between the 'django.contrib.sessions.middleware.SessionMiddleware',
and the 'django.middleware.common.CommonMiddleware',
, as follows:
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'djangoldp_account.auth.middleware.JWTUserMiddleware',
]
In the template context processors, please add the 'django.template.context_processors.i18n',
, ideally between the 'django.contrib.auth.context_processors.auth',
and 'django.contrib.messages.context_processors.messages',
like so:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.contrib.messages.context_processors.messages',
],
},
},
]
Needs validation but I think that's enough to start, by automatically enabling the translation loading of the login + registration workflow from djangoldp_account at least, based on the user locale.