I'm doing some IP localization and need to set the language in a view.
Using translation.activate changes the language, but the rendered page
still have the default language prefix in its URL.
Is there any way to also change the rendered URL?
thanks
jul
A URL is not "rendered," it is requested by the browser. Once the
browser has requested a given URL you can't change it from the server
side. What you can do is return an HTTP redirect to a different URL.
(In this case there's no point in using translation.activate(), all
you need to do is make sure the URL you are redirecting to has the
proper language prefix). django-localeurl's built-in change_locale
view handles all this for you, I recommend you just use that.
Carl
jul