I use a language switcher:
def setlang(request):
if get_language() == 'de':
lang = 'en'
else:
lang = 'de'
response = redirect('index')
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang)
return response
index:
def index(request):
return render(request, 'index.html')
Works on http, on https (nginx+gunicorn+certbot) the cookie is set, which I can see though googledeveloper console, the function get_language is also working, which I checked by ‘LANGUAGE_CODE = …’ alterration, but Django doesn’t change the language after the redirect.
Any ideas?