When I use Django’s logout function to log out an authenticated user, it switched locale to en_US, the default one.
from django.contrib.auth import logout
def someview(request):
logout(request)
return HttpResponseRedirect('/')
How to keep user’s locale after logged out?
You could try explicitly setting the language cookie when the user logs out, there’s a bit about how django determines the language setting here in the djangodocs.
I would have presumed that the language setting would have remained as a session value on logging out, maybe it needs to be reinitialised if django completely destroys the session on logging out the user.