I have been running into an issue setting up locales for my Django app. When I run the django-admin's makemessages command no resulting .po files show up in my {project_root}/locales folder.
Here are the steps I followed to setup locales:
Created locale/ folder in project root
Changes to settings.py
from os.path import join as osjoin
MIDDLEWARE = [
...
'django.middleware.locale.LocaleMiddleware',
...
]
USE_I18N = True
LOCALE_PATHS = [
osjoin(BASE_DIR, 'locale'),
]
Solved missing dependencies Had to install GNU gettext (for windows) and added it to system PATH.
Commands I ran
python manage.py makemessages -l fr
also tried:
django-admin makemessages -l fr
I also tried with the fr_FR tag, didn't change anything.
both result in this output message but no files added to locales/:
processing locale fr
I also superstitiously tried to run the command as admin but didn't change much.
I am also aware of these answers to the same question (9 years ago) but the answers didn't help.