There is the source code:
//when you fill up all the form option and submit it , it will execute
this
if request.method == 'POST':
lang_code=request.POST.get("language",request.LANGUAGE_CODE)
if check_for_language(lang_code) and lang_code !=
request.session.get('django_language'):
request.session['django_language'] = lang_code
.........
.........
//when you visite the url first , it will execute this
else:
lang_code=request.LANGUAGE_CODE
if request.COOKIES.has_key(settings.LANGUAGE_COOKIE_NAME) and
check_for_language(request.COOKIES[settings.LANGUAGE_COOKIE_NAME]):
lang_code = request.COOKIES[settings.LANGUAGE_COOKIE_NAME]
request.session['django_language'] = lang_code
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---