From 002b3d87b5f1e35edcb6e14ce2e2827fc6c032a1 Mon Sep 17 00:00:00 2001 From: Tomáš Ehrlich Date: Sun, 31 May 2015 15:20:19 +0100 Subject: Fixed #24230 -- Added translated language name for i18n template tag/filter. --- docs/topics/i18n/translation.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/topics') diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index bfaec965e4..d3f68d2ca5 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -870,6 +870,11 @@ You can then access the information:: Name of language: {{ lang.name_local }}
Name in English: {{ lang.name }}
Bi-directional: {{ lang.bidi }} + Name in the active language: {{ lang.name_translated }} + +.. versionadded:: 1.9 + + The ``name_translated`` attribute was added. .. templatetag:: get_language_info_list @@ -899,6 +904,7 @@ you can iterate over those languages in the template:: .. templatefilter:: language_name .. templatefilter:: language_name_local .. templatefilter:: language_bidi +.. templatefilter:: language_name_translated Template filters ~~~~~~~~~~~~~~~~ @@ -908,6 +914,11 @@ There are also simple filters available for convenience: * ``{{ LANGUAGE_CODE|language_name }}`` ("German") * ``{{ LANGUAGE_CODE|language_name_local }}`` ("Deutsch") * ``{{ LANGUAGE_CODE|language_bidi }}`` (False) +* ``{{ LANGUAGE_CODE|language_name_translated }}`` ("německy", when active language is Czech) + +.. versionadded:: 1.9 + + The ``language_name_translated`` filter was added. .. _Django templates: ../templates_python/ -- cgit v1.3