Hi

I try to add translation for Thai language. I did following,

1. My environment is Window so I use Window version of xgettext, see
http://gnuwin32.sourceforge.net/packages/gettext.htm
2. Under my application path, I created directory conf/locale.
3. Executed make-messages.py -l th.
4. I can see conf\locale\th\LC_MESSAGES\django.po.
5. I successfully executed make-messages.py -a.
6. Comoiled, compile-messages.py
7. Set LANGUAGE_CODE to "th".
8. Tested by adding trans tag in template (using message I've added
in .po file).
9. Try to force session and cookie language.
10  Nothing is translated.

Note, I tested 'th' for check_for_language(from
django.utils.translation import ), it returns False.

This is code use to override language settings.

        lang_code = 'th'
        if hasattr(request, 'session'):
            request.session['django_language'] = lang_code
        else:
            response.set_cookie(settings.LANGUAGE_COOKIE_NAME,
lang_code)

Did I do something wrong?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to