I want to ignore the post form in the django's internatonalization.
I am using the django-multilingual app, so I have different fields for different languages in the db.
I come up with this idea: For each language, from the index.html page, redirect to a different url (e.g. /en/ or /de/ or /zh/). And each view of this urls, set the session according to the language like this:
def set_lang_en(request):
request.session['django_language'] = 'en'
render_to_response("home.html")
def set_lang_zh(request):
request.session['django_language'] = 'zh-cn'
render_to_response("home.html")
Interestingly, this does the job, but if i refresh the page again after redirection (home.html).
Why it is like this? And how can solve this problem either in my direction or other one?