Hi, Now , I face a problem about Internationalization, I have used
django +

python + extjs to created a log in html page. And my browser is
Firefox.

In the page , the user can select the language which will be shown in
the next

page .

For instance, when you open the log in page , it was showed in
Chinese. Now , I

just want to it was showed in English. So , you can select the
language option

to English. After you submit , you will see the page as English now.
In this

time , my Firefox browser use the Chinese as default language in
language

option.

But , there is a problem: when I set the Firefox browser's language
option as

English first , the select option won't work any more. Whichever
language you

select in the popup box,it was showed in English except the
internationalized

Javascript. That is , the python code and template can't be
translated.

When I change the language option of Firefox browser in Chinese ,it
works again.

This is my problem about Internationalization , please help me !

thank you!




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 django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to