diff options
| author | Chris Beaven <smileychris@gmail.com> | 2011-05-23 01:54:37 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2011-05-23 01:54:37 +0000 |
| commit | 18ecfad76785746b14e441d7379fc3b086da8d7a (patch) | |
| tree | 4ae86018ee250d24fad493ea6c8d030647669ad5 /docs | |
| parent | b9bdc96f9ea8e4d572a79471c68ec239136a4d01 (diff) | |
[1.3.X] Fixes #16072 -- incorrect documentation for multiple expressions inside a blocktrans tag
Backport of r16268 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/i18n/internationalization.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt index 20680bdc8f..368b616bbb 100644 --- a/docs/topics/i18n/internationalization.txt +++ b/docs/topics/i18n/internationalization.txt @@ -490,13 +490,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 %} 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 @@ -528,9 +530,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:: |
