i18n - explain use of LOCALE_PATHS for translations outside of project root and apps
|Reported by:||dmarble||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I scratched my head for a while trying to figure out how to include compiled translations from a directory that is not part of the usual translation traversal, i.e. <project root>/locale and each <app>/locale directory.
I ended up stepping through code for a while to find out that trans_real.py searches for LOCALE_PATHS, a tuple/list that can be explicitly defined in settings.py with extra locale directories for use in translation.
This is important where templates may be kept separately from apps and outside of the main project root folder. For example, in pinax, apps are kept in a separate folder which is referenced in a new project based on pinax, but the templates for those external apps are in the main pinax/ project directory.
An example could be added describing this situation in the translation / i18n documentation pages.
LOCALE_PATHS = ( '/path/to/external/locale', )