Skip to content
Rowan Seymour edited this page Mar 13, 2015 · 1 revision

If you are new to Django you can read about the Django approach to localization used by TracPro at http://www.djangobook.com/en/2.0/chapter19.html.

Adding New Languages

To add a new language to TracPro:

  1. Edit settings_common.py and add the language to the LANGUAGES list setting.
  2. If the language is RTL, add its code to RTL_LANGUAGES.
  3. Create an empty directory under the locale folder using the 2-letter ISO code of the language as the folder name.

Translating

To generate new *.po files run the following command:

./manage.py makemessages --all --ignore=*/compressor/* --ignore=*/sorl/* --ignore=*/xlwt/*

This project uses Transifex for translation. The English *.po file is uploaded there and translators can provide translations of the various strings used in the application. We can then download *.po files in different languages.

When Django is running, it fetches localized messages from *.mo files. We can generate these from the *.po files as follows:

./manage.py compilemessages
Clone this wiki locally