-
Notifications
You must be signed in to change notification settings - Fork 5
Translation of the TQ website
Renato Bellotti edited this page Apr 27, 2018
·
11 revisions
Use the trans
tag in HTML sites for django:
https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#trans-template-tag
Essentially, you have to run two scripts:
scripts/makemessages.sh
scripts/compilemessages.sh
Run django-admin makemessages -a
to create the .po files.
Works only with gettext installed, see below for installation
then after you've updated the German text in the .po file you can run
django-admin compilemessages
to compile the language files.
Check in the language files as well, we don't compile a second time on the live server
Please use English as the default language and then add German translations.
-
brew install gettext
in Terminal and then -
brew link gettext --force
to make it work ;)
docker-compose run --rm django python3 manage.py compilemessages