diff options
| author | Leila20 <leila@levit.be> | 2016-07-02 18:10:09 +0200 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2016-07-02 18:10:09 +0200 |
| commit | de4265e082bcce45ef6fb0929a44205463ba552e (patch) | |
| tree | fad31860589d8c49fd8bee4d6681d0fb2a589bd6 /docs/topics | |
| parent | a9215b7c36bff232bcc9416309726290dc74a9e8 (diff) | |
Fixed #26832 -- Added translated language name on the get_language_info documentation
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/i18n/translation.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index d74ad359c6..bc2a2b84ce 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -525,13 +525,15 @@ Localized names of languages The ``get_language_info()`` function provides detailed information about languages:: - >>> from django.utils.translation import get_language_info + >>> from django.utils.translation import activate, get_language_info + >>> activate('fr') >>> li = get_language_info('de') - >>> print(li['name'], li['name_local'], li['bidi']) - German Deutsch False + >>> print(li['name'], li['name_local'], li['name_translated'], li['bidi']) + German Deutsch Allemand False -The ``name`` and ``name_local`` attributes of the dictionary contain the name of -the language in English and in the language itself, respectively. The ``bidi`` +The ``name``, ``name_local``, and ``name_translated`` attributes of the +dictionary contain the name of the language in English, in the language +itself, and in your current active language respectively. The ``bidi`` attribute is True only for bi-directional languages. The source of the language information is the ``django.conf.locale`` module. |
