setlang and translated url patterns

55 views
Skip to first unread message

Michel Thadeu Sabchuk

unread,
Aug 13, 2012, 8:24:06 AM8/13/12
to django-d...@googlegroups.com
Hi guys,

I'm doing a site in english and portuguese and a cool thing I'm using is translated urls. The only problem is that changing the language through django.views.i18n.set_language fails because it try to redirect to the HTTP_REFERER and I didn't see how to set the proper next value so the set_language won't fail.

I propose to create a new GET parameter called "reverse" that causes the set_language view to first try to resolve the url present in the "next" GET parameter than reverse it to the proper language.

That keeps the backward compatibilty: to enable it, coders must add the "reverse" GET parameter. I can send a patch if you agree.

Best regards,

--
Michel Sabchuk
Reply all
Reply to author
Forward
0 new messages