-
Notifications
You must be signed in to change notification settings - Fork 871
Translation
evgenyfadeev edited this page Sep 13, 2010
·
22 revisions
Currently cnprog “understands” Chinese, English and Spanish.
To translation to another language – you need to work on two files:
- /locale/lang_code/LC_MESSAGES/django.po
- /templates/content/js/com.cnprog.i18n.js
- create a directory /locale/your_lang_code/LC_MESSAGE
- copy a django.po file from the translation that you understand to that new directory
- translate strings that start with “msgstr”, keep strings “msgid” intact and preserve overall format.
- any strings that have a comment above them like #, fuzzy will not be shown as translated – verify translation for those and then remorve the “fuzzy” string.
- if a string takes variables – make sure to follow format of translation strings it should have things like %(the_variable)s to properly insert values
- also strings like that must have a comment just above msgstr
#, python-format
- at any time run
python manage.py compilemessages
– that will create django.mo file that is actually feeding translations into the application