1. Luke Plant
  2. django

Commits

jez...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed c09b71d

[1.2.X] Fixed #14910 -- Clarified the order of precedence of loading translation catalogues. Thanks, vanschelven.

Backport from trunk (r14998).

  • Participants
  • Parent commits 34fc621
  • Branches releases/1.2.X

Comments (0)

Files changed (2)

File docs/howto/i18n.txt

View file
  • Ignore whitespace
 
 At runtime, Django looks for translations by following this algorithm:
 
-    * First, it looks for a ``locale`` directory in the application directory
-      of the view that's being called. If it finds a translation for the
-      selected language, the translation will be installed.
-    * Next, it looks for a ``locale`` directory in the project directory. If it
-      finds a translation, the translation will be installed.
+    * First, it looks for a ``locale`` directory in the directory containing
+      your settings file.
+    * Second, it looks for a ``locale`` directory in the project directory.
+    * Third, it looks for a ``locale`` directory in each of the installed apps.
+      It does this in the reverse order of INSTALLED_APPS
     * Finally, it checks the Django-provided base translation in
       ``django/conf/locale``.
 

File docs/topics/i18n/deployment.txt

View file
  • Ignore whitespace
 As described in :ref:`using-translations-in-your-own-projects`,
 at runtime, Django looks for translations by following this algorithm:
 
-    * First, it looks for a ``locale`` directory in the application directory
-      of the view that's being called. If it finds a translation for the
-      selected language, the translation will be installed.
-    * Next, it looks for a ``locale`` directory in the project directory. If it
-      finds a translation, the translation will be installed.
+    * First, it looks for a ``locale`` directory in the directory containing
+      your settings file.
+    * Second, it looks for a ``locale`` directory in the project directory.
+    * Third, it looks for a ``locale`` directory in each of the installed apps.
+      It does this in the reverse order of INSTALLED_APPS
     * Finally, it checks the Django-provided base translation in
       ``django/conf/locale``.