Unable to find a locale path to store translations for file __init__.py

Antoine M. picture Antoine M. · Jul 24, 2014 · Viewed 25.9k times · Source

I'm trying to translate a Django app. I created some strings with {% trans %} in my templates. However, when I execute the following command in my app folder, I receive an error message:

$ django-admin.py makemessages -l fr 
CommandError: Unable to find a locale path to store translations for file __init__.py`

What did I do wrong?

Answer

Antoine M. picture Antoine M. · Jul 24, 2014

Turns out you need to create a locale folder first using mkdir locale. If you are running the command from within an app folder, you need a locale folder within that app folder.