Django Translation commonly used commands

 

In this post I publish a list of commonly used commands and methods to add extra translations in a ready project. This note is used as a shortcut for frequently recurring tasks. For more detailed information see Django project documentation. https://docs.djangoproject.com/en/3.1/topics/i18n/translation/

Proces locale nl and add new translations in locale/nl/LC_MESSAGES/django.po

python manage.py makemessages -l nl

vim locale/nl/LC_MESSAGES/django.po  

Find new string and add correct translation.

 

 When it's done

 python manage.py  compilemessages

service apache2 reload

python manage.py cleancache

 

Compile and refresh caching to see results.

 

 All right, it's done. 😂😀

Comments