If you’re building a reusable django package and you want multiples languages for your templates or model and forms labels, you are wondering how can you generate the different locale files.
After marking all your code strings to be tranaslated as is explained here you would need to generate the .po files.
Follow these steps:
Make sure you have a virtual environment for the package, a virtual environment for test purposes or install django globally on your operating system.
Go to to your package source folder, for example
Create a locale folder there, for example
django-admin makemessages. See more options here.
After that, you will see all the locale files created inside your