Localization¶
An example of localizing the program for Finnish(fi_FI). Works similarly for any other language.
Extract messages with:
python setup.py extract_messages
For new languages initialize the .po file with:
python setup.py init_catalog -l fi_FI
For existing languages update the .po file with:
python setup.py update_catalog -l fi_FI
Add any missing translations to the .po file at kvalikirstu2/locale/fi_FI/kvalikirstu2.po using any text editor
Get localization json file for Datatables.net. The .json file should be placed in kvalikirstu2/locale/table_localization. Translate “English.json” to “Finnish.json” in kvalikirstu2/locale/fi_FI/kvalikirstu2.po to make the table localization in the index work.
Compile the text based catalog with:
python setup.py compile_catalog -l fi_FI
The application should now automatically use the translations based on the user’s localization settings.