I have a Django app with several local locale folders, stored in the translations folder of the base directory:
translations/public/locale/{en,fr}
translations/portal/locale/{en,fr}
translations/terminology/locale/{en,fr}
with corresponding entries in LOCALE_PATHS
:
LOCALE_PATHS = (
os.path.abspath(os.path.join(BASE_DIR, 'translations', 'public', 'locale')),
os.path.abspath(os.path.join(BASE_DIR, 'translations', 'portal', 'locale')),
os.path.abspath(os.path.join(BASE_DIR, 'translations', 'terminology', 'locale')),
)
It all works fine, but I don't know how to tell makemessages
where to put its output. I don't see any relevant parameters in the source code. My preference would be to put the file somewhere else, like:
% bin/dev/manage.py makemessages -o .../derived_translations
How do I control, or at least determine where the output files are put?
It says it right in the help for
makemessages
:So there you go, they will either be in the
conf/locale
orapp_name/locale
directories.As for customizing the output directory, it does not look like it would be possible without writing a custom version of
makemessages.py