[1.2.X] Fixed #14910 -- Clarified the order of precedence of loading translation catalogues. Thanks, vanschelven.
Backport from trunk (r14998). git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9184dba1f5
commit
af1c8b2cfa
|
@ -6,11 +6,11 @@ Using internationalization in your own projects
|
||||||
|
|
||||||
At runtime, Django looks for translations by following this algorithm:
|
At runtime, Django looks for translations by following this algorithm:
|
||||||
|
|
||||||
* First, it looks for a ``locale`` directory in the application directory
|
* First, it looks for a ``locale`` directory in the directory containing
|
||||||
of the view that's being called. If it finds a translation for the
|
your settings file.
|
||||||
selected language, the translation will be installed.
|
* Second, it looks for a ``locale`` directory in the project directory.
|
||||||
* Next, it looks for a ``locale`` directory in the project directory. If it
|
* Third, it looks for a ``locale`` directory in each of the installed apps.
|
||||||
finds a translation, the translation will be installed.
|
It does this in the reverse order of INSTALLED_APPS
|
||||||
* Finally, it checks the Django-provided base translation in
|
* Finally, it checks the Django-provided base translation in
|
||||||
``django/conf/locale``.
|
``django/conf/locale``.
|
||||||
|
|
||||||
|
|
|
@ -178,11 +178,11 @@ How Django discovers translations
|
||||||
As described in :ref:`using-translations-in-your-own-projects`,
|
As described in :ref:`using-translations-in-your-own-projects`,
|
||||||
at runtime, Django looks for translations by following this algorithm:
|
at runtime, Django looks for translations by following this algorithm:
|
||||||
|
|
||||||
* First, it looks for a ``locale`` directory in the application directory
|
* First, it looks for a ``locale`` directory in the directory containing
|
||||||
of the view that's being called. If it finds a translation for the
|
your settings file.
|
||||||
selected language, the translation will be installed.
|
* Second, it looks for a ``locale`` directory in the project directory.
|
||||||
* Next, it looks for a ``locale`` directory in the project directory. If it
|
* Third, it looks for a ``locale`` directory in each of the installed apps.
|
||||||
finds a translation, the translation will be installed.
|
It does this in the reverse order of INSTALLED_APPS
|
||||||
* Finally, it checks the Django-provided base translation in
|
* Finally, it checks the Django-provided base translation in
|
||||||
``django/conf/locale``.
|
``django/conf/locale``.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue