[Answer]-Django translation i18n thread

1👍

You can check the documentation for translation.

activate() works only for the current view. To hold it for the entire session you need to set the session variable (or a cookie if you are not using session)

from django.utils import translation
user_language = 'fr'
translation.activate(user_language)
request.session[translation.LANGUAGE_SESSION_KEY] = user_language

Leave a comment