[Answered ]-Django form is not valid when LANGUAGE_SESSION_KEY is not english

1👍

I think is because of not existing idom in languages code, first check it :

from django.utils.translation import check_for_language
user_language = user.profile.idiom
if user_language and check_for_language(user_language ):
    translation.activate(user_language)
else:
    raise Exeption()

django.utils.translation.check_for_language() which checks if the given language is supported by Django.
read more

Leave a comment