#13451: i18n - explain use of LOCALE_PATHS for translations outside of project 
root
and apps
---------------------------+------------------------------------------------
 Reporter:  dmarble        |       Owner:  nobody    
   Status:  new            |   Milestone:  1.2       
Component:  Documentation  |     Version:  1.2-beta  
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 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.

 For example:
 {{{

 LOCALE_PATHS = (
     '/path/to/external/locale',
 )
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13451>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to