OneSky Dev

How to localize Python applications

Tutorial from Python.org with Gettext

http://docs.python.org/library/gettext.html

Examples:

locale/en_US/LC_MESSAGES/app.po
msgid "hello_name"
msgstr "Hello %s"

msgid "home"
msgstr "Home"

msgid "person"
msgid_plural "people"
msgstr[0] "1 person"
msgstr[1] "%d people"
locale/zh_TW/LC_MESSAGES/app.po
msgid "hello_name"
msgstr "%s你好"

msgid "home"
msgstr "首頁"

msgid "person"
msgid_plural "people"
msgstr[0] "1個人"
msgstr[1] "%d個人"