Issue trying to change user from Django template
I need to include two buttons or links to allow users change language
between English and Spanish. I've read the docs and tried this:
<form action="/i18n/setlang/" method="post">{% csrf_token %}
<input name="language" type="hidden" value="es" />
<input type="submit" value="ES" />
</form>
However, every time I click the button, the page is reload but the
language doesn't change at all. Am I missing something?
Note: I haven't set next, as I just want to reload the current page in the
desired language.
No comments:
Post a Comment