i18n with webpy
- by translation..
Hello, i Have a problem with i18n, using webpy.
I have followed this : http://webpy.org/cookbook/i18n_support_in_template_file
So, in my .wsgi there is :
#i18n
gettext.install('messages',I18N_PATH,unicode=True)
gettext.translation('messages',I18N_PATH,languages=['fr_FR','en_US']).install(True)
So i ran :
pygettext.py -a -v -d messages -o i18n/messages.po controllers/*.py views/*.html
I have copied and translated messages.po, I have also change the "content-type" and the "content-transfer-encoding:
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: UTF-8\n"
And i ran this command:
msgfmt -v -o i18n/fr_FR/LC_MESSAGES/messages.mo i18n/fr_FR/LC_MESSAGES/messages.po
>>>93 messages traduits.
here is the arborescence of i18n folder:
i18n/:
en_US fr_FR messages.po
i18n/en_US:
LC_MESSAGES
i18n/en_US/LC_MESSAGES:
messages.mo messages.po
i18n/fr_FR:
LC_MESSAGES
i18n/fr_FR/LC_MESSAGES:
messages.mo messages.po
But when i go in my website (my browser's language is "fr_fr"), i haven't the string translated.
And I don't know why.
Anyone has an idea?
Thanks