summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-10-07 10:46:08 +0200
committerClaude Paroz <claude@2xlibre.net>2015-10-07 17:25:23 +0200
commit9a6fc9606c028659daed56dd11a08e03db358fe4 (patch)
treee11402532097a161f3868f5f3b5cfe19917f1d01 /docs/topics
parenta76309f007fff6957f39190b06f8a9055f73130f (diff)
Added some function links in translation docs
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/i18n/translation.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 82d0e54358..14d10aa001 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1878,14 +1878,15 @@ For example::
Calling this function with the value 'de' will give you ``"Willkommen"``,
regardless of :setting:`LANGUAGE_CODE` and language set by middleware.
-Functions of particular interest are ``django.utils.translation.get_language()``
-which returns the language used in the current thread,
-``django.utils.translation.activate()`` which activates a translation catalog
-for the current thread, and ``django.utils.translation.check_for_language()``
+Functions of particular interest are
+:func:`django.utils.translation.get_language()` which returns the language used
+in the current thread, :func:`django.utils.translation.activate()` which
+activates a translation catalog for the current thread, and
+:func:`django.utils.translation.check_for_language()`
which checks if the given language is supported by Django.
To help write more concise code, there is also a context manager
-``django.utils.translation.override()`` that stores the current language on
+:func:`django.utils.translation.override()` that stores the current language on
enter and restores it on exit. With it, the above example becomes::
from django.utils import translation