In Django i18n, the locale paths doesn't work
Here how I implemented:
I kept locale folder like this in my project:
-Project #*main Project directory
-apps
-apps
-templates
-project
-settings.py
-locale #outside project folder but within main Project
-ru_RU
-LC_MESSAGES
-django.po
Now I gave the locale path in settings.py like:
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
LOCALE_PATHS = (
os.path.join(PROJECT_PATH, '../locale'),
)
Language choices:
LANGUAGES = (
('en-us', 'English'),
('ru_RU', 'Russian'),
)
LANGUAGE_CODE = 'en-us' 'ru_RU'
Finally added the middleware:
django.middleware.locale.LocaleMiddleware
Hopefully it will help. I wrote about it in details at my blog: http://ruddra.com/2015/09/17/django-translation-using-po-file/ .