Search code examples
djangointernationalizationlocale

Django custom locale directory


I'm developing a project with two different sites, divided by language. Maybe I was terribly wrong, but now my directory structure looks like:

/ruapp/settings.py # SITE_ID = 1 
/ruapp/manage.py 
/enapp/settings.py # SITE_ID = 2 
/enapp/manage.py 
/common/urls.py 
/common/ # almost every other file 
/common/templates/ # templates with {% trans %} 
/locale/ # with locales ru-ru and en-us, generated by calling 
makemessages from the root of all this structure

How to tell django about the locale? It does not seem like it will find the /locale/ folder by itself


Solution

  • AFAIK, python-gettext can't use different folder, so... Use Symlinks, Luke!