-
Make sure you have
gettext
installed:brew install gettext
-
(Re)Generate the
django.po
file:./manage.py makemessages -a
-
Update the
django.po
file to remove commented out translation strings from previous version of file. Be careful that the strings are all used. -
Gather the strings that don't have translations (the ones that have
msgstr ""
and get translations for them. -
Enter the translated strings into the correct records.
-
Compile the translation file (
django.mo
):
./manage.py compilemessages
- Test the web app to make sure all strings that should be translated are showing up as translated. You may need to restart your local development server to pick up the changed
django.mo
file.
Error:
CommandError: Can't find msgfmt. Make sure you have GNU gettext tools 0.15 or newer installed.
Run:
brew install gettext
brew link gettext --force