diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-09-08 13:24:41 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-09-08 13:24:41 +0000 |
| commit | 16bb9c594cf7306f4b2fc3ba915be43b05dad5d2 (patch) | |
| tree | 447587001df5ccf70e094b6e89d796c80c54ae7a /docs/topics | |
| parent | 2b4341d532b376702a17212a9ff9f8710ca4c14a (diff) | |
Fixed #16516 -- Relaxed the blocktrans rendering a little by falling back to the default language if resolving one of the arguments fails, raising a KeyError. Thanks, Claude Paroz and Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/i18n/internationalization.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt index 176ad7fb43..dbeb77c879 100644 --- a/docs/topics/i18n/internationalization.txt +++ b/docs/topics/i18n/internationalization.txt @@ -512,6 +512,13 @@ You can use multiple expressions inside a single ``blocktrans`` tag:: .. note:: The previous more verbose format is still supported: ``{% blocktrans with book|title as book_t and author|title as author_t %}`` +.. versionchanged:: 1.4 + +If resolving one of the block arguments fails, blocktrans will fall back to +the default language by deactivating the currently active language +temporarily with the :func:`~django.utils.translation.deactivate_all` +function. + This tag also provides for pluralization. To use it: * Designate and bind a counter value with the name ``count``. This value will |
