I am trying to add a Chinese language to my application written in Django and I have a really hard time with that. I have spent half a day trying different approaches, no success.
My application supports few languages, this is part of settings.py file:
TIME_ZONE = 'Europe/Dublin'
LANGUAGE_CODE = 'en'
LOCALES = (
#English
('en', u'English'),
#Norwegian
('no', u'Norsk'),
#Finish
('fi', u'Suomi'),
#Simplified Chinese
('zh-CN', u'简体中文'),
#Traditional Chinese
('zh-TW', u'繁體中文'),
#Japanese
('ja', u'日本語'),
)
At the moment all (but Chinese) languages work perfectly. This is a content of locale directory:
$ ls locale/
en
fi
ja
no
zh_CN
zh_TW
In every directory I have LC_MESSAGES directory with *.mo and *.po files. *.po files are created by script written in Python, which converts *.ODS to a text file. *.mo files are created by python manage.py compilemessages command.
Language can be selected by user from the proper form in "Preferences" section in my application.
Django does not load Chinese translation. That is the problem. Both simplified and traditional does not work. I have tried different variations of language and locale codes in settings.py and in locale directory: zh-CN, zh-cn, zh_CN, zh_cn. No success.
Perhaps I made a simple mistake? I have added Polish language just for test and everything went fine. Basically I did the same. I have added ('pl', u'Polish') tuple to the settings.py and "locale/pl" with *.po and *.mo and LC_MESSAGES directory...
Do you know what might be wrong?