diff options
| author | Chris Beaven <smileychris@gmail.com> | 2011-05-23 01:52:49 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2011-05-23 01:52:49 +0000 |
| commit | 17a6bb0f700dcdf422d88dcb110b76098e948674 (patch) | |
| tree | 90704db5ea34e0805193984d30bab28c0ae277fc | |
| parent | fcf7fbc68cadb7efd8bc779c0e189389d6475463 (diff) | |
Fixes #16072 -- incorrect documentation for multiple expressions inside a blocktrans tag
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | docs/topics/i18n/internationalization.txt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt index ff1c80122c..c9da4c36da 100644 --- a/docs/topics/i18n/internationalization.txt +++ b/docs/topics/i18n/internationalization.txt @@ -491,13 +491,15 @@ for use within the translation block. Examples:: This will have {{ myvar }} inside. {% endblocktrans %} -If you need to bind more than one expression inside a ``blocktrans`` tag, -separate the pieces with ``and``:: +You can use multiple expressions inside a single ``blocktrans`` tag:: - {% blocktrans with book_t=book|title and author_t=author|title %} + {% blocktrans with book_t=book|title author_t=author|title %} This is {{ book_t }} by {{ author_t }} {% endblocktrans %} +.. note:: The previous more verbose format is still supported: + ``{% blocktrans with book|title as book_t and author|title as author_t %}`` + This tag also provides for pluralization. To use it: * Designate and bind a counter value with the name ``count``. This value will @@ -529,9 +531,6 @@ construct is internally converted to an ``ungettext`` call. This means the same :ref:`notes regarding ungettext variables <pluralization-var-notes>` apply. -.. note:: The previous more verbose format is still supported: - ``{% blocktrans with book|title as book_t and author|title as author_t %}`` - Reverse URL lookups cannot be carried out within the ``blocktrans`` and should be retrieved (and stored) beforehand:: |
