1👍
You should update the LOCALE_PATHS
list to include the locale
directory of your app that holds the to-be-translated models.
LOCALE_PATHS = [
os.path.join(BASE_DIR, 'locale'),
os.path.join(BASE_DIR, 'myapp', 'locale'), # translation lookup directory for "myapp" app
os.path.join(BASE_DIR, 'another_app', 'locale'), # translation lookup directory for "another_app" app
]
Then, you should manually create the locale structure under your app, like this:
myapp/locale/ru/LC_MESSAGES/
Then, run ./manage.py makemessages --all
which will look under each locale
dir declared inside the LOCALE_PATHS
and create there the .po
file. You know the rest (./manage.py compilemessages
).
Source:stackexchange.com