The base language of my site is Chinese. I want to change to English 
when user select language perferrence.

In my base.html, I have
{% trans "产品" %}

I generated django.po file using
django-admin.py makemessages -l en

In django.po file of en locale,
#: .\templates\base.html.py:36
msgid "å…¬å ¸äº§å“ "
msgstr "Products"

As you can see, the generated msgid is scrambled and invalid. This 
caused translation failed. If I manually changed the msgid to be
msgid "产品"
msgstr "Products"

The translation works. I verified that my base.html is utf-8 encoded. 
Anyone know what is the reason for the scrambled msgid in django.po 
file? I suspect this is an encoding issue on makemessages command, but 
don't know how to resolve this.


--~--~---------~--~----~------------~-------~--~----~
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