#25096: set_language view does not redirect to specified language if next is not
set
--------------------------------------+--------------------
Reporter: marshalc | Owner: nobody
Type: Uncategorized | Status: new
Component: Internationalization | Version: 1.8
Severity: Normal | Keywords: i18n
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
[http://stackoverflow.com/questions/31306277/django-1-8-set-language-view-
does-not-redirect-to-specified-language?sfb=2]
Most of what I'm about to say has been documented in more detail on the
above stack overflow link.
In short, posting to set_language with a language code and no next value
results in the language code being ignored and not changed, because the
second step of determining the redirect url does not account for the fact
that having i18n urls enabled means that the REFERRER url contains the
previous language code, which is what is picked up by the locale
middleware first, which then discards the session data saved by
set_language in the first place.
I would suggest that this function is modified to remove the language code
prefix from the REFERRER url, so that the resulting redirect goes to the
current page and with the newly selected language.
--
Ticket URL: <https://code.djangoproject.com/ticket/25096>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.f730dbcd0a56a5bb8589ce8107212b73%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.