Django localeurl: Changing language and language prefix in the rendered url in a view?

Try to do in view same thing as LocaleURLMiddleware: translation. Activate(locale) request. LANGUAGE_CODE = translation.

Get_language() PS. Do you use {% url %} and {% locale_url %}?

The problem is that the middleware has already set the value of the language in the Request, so you will have to add your own middleware (after CommonMiddleware I believe). Inside your middleware class your process_request method will set the language and your process_response method will reset the language. docs.djangoproject.com/en/dev/topics/htt... There may be a shortcut for not using middleware (manually setting the request LANGUAGE_CODE value and doing translation.

Activate within the view), but I have not tried anything like this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions