1π
β
I would personnaly use the following view function:
def changeLang(request):
request.session['lang'] = request.GET['lang'] #'en/' or 'fr/' etc...
return render_to_response(request.session['lang'] + 'home.html', {}, RequestContext(request))
Where I have my templates folder ready for the different options for lang.
Iβm quite aware that django supports internationalization, but itβs always more accurate to build a version for each language, especially if one of them is a Right To Left language, which is my case.
π€Bit68
Source:stackexchange.com