NB: the whole approach of serving a Vue project through Django is less than ideal, so this can be seen as deprecated.
The goal of this gist is to be able to use the built-in makemessages
command of Django on your Vue frontend. You can then expose a JavaScript catalog and localize your frontend using gettext
.
Following assumptions are made:
- The directory for the frontend lives in your Django project
- You are using components (.vue files)
Somewhere in urls.py
: