summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-06-28 10:25:46 -0400
committerGitHub <noreply@github.com>2018-06-28 10:25:46 -0400
commitfd06488fe36acc27fbe37bf7c9aefc0574e9cc4e (patch)
tree425937398a34530d6d350e3c51f1fe01f953b9e1 /docs
parent99157064a02b966dbebf72dc57fd51adb10895d9 (diff)
Fixed links for i18n context processor docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/api.txt10
-rw-r--r--docs/topics/i18n/translation.txt11
2 files changed, 16 insertions, 5 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index 986e7e9361..c1a1754b29 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -690,14 +690,20 @@ the request's IP address (``request.META['REMOTE_ADDR']``) is in the
``django.template.context_processors.i18n``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-If this processor is enabled, every ``RequestContext`` will contain these two
+.. function:: i18n
+
+If this processor is enabled, every ``RequestContext`` will contain these
variables:
* ``LANGUAGES`` -- The value of the :setting:`LANGUAGES` setting.
+* ``LANGUAGE_BIDI`` -- ``True`` if the current language is a right-to-left
+ language, e.g. Hebrew, Arabic. ``False`` if it's a left-to-right language,
+ e.g. English, French, German.
* ``LANGUAGE_CODE`` -- ``request.LANGUAGE_CODE``, if it exists. Otherwise,
the value of the :setting:`LANGUAGE_CODE` setting.
-See :doc:`/topics/i18n/index` for more.
+See :ref:`i18n template tags <i18n-template-tags>` for template tags that
+generate the same values.
``django.template.context_processors.media``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 2fe1497cf1..34313034c8 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -845,7 +845,7 @@ If you want to select a language within a template, you can use the
While the first occurrence of "Welcome to our page" uses the current language,
the second will always be in English.
-.. _template-translation-vars:
+.. _i18n-template-tags:
Other tags
----------
@@ -880,8 +880,13 @@ locale's direction. If ``True``, it's a right-to-left language, e.g. Hebrew,
Arabic. If ``False`` it's a left-to-right language, e.g. English, French,
German, etc.
-If you enable the ``django.template.context_processors.i18n`` context processor
-then each ``RequestContext`` will have access to ``LANGUAGES``,
+.. _template-translation-vars:
+
+``i18n`` context processor
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you enable the :class:`django.template.context_processors.i18n` context
+processor, then each ``RequestContext`` will have access to ``LANGUAGES``,
``LANGUAGE_CODE``, and ``LANGUAGE_BIDI`` as defined above.
.. templatetag:: get_language_info