mirror of
https://github.com/django/django.git
synced 2025-01-27 10:39:40 +00:00
Fixed #14421 -- Clarified the english in the i18n documentation. Thanks to Ned Batchelder for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
480c6c6958
commit
08beb148c8
@ -387,15 +387,14 @@ separate the pieces with ``and``::
|
|||||||
This is {{ book_t }} by {{ author_t }}
|
This is {{ book_t }} by {{ author_t }}
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
This tag is also in charge of handling another functionality: Pluralization.
|
This tag also provides for pluralization. To use it:
|
||||||
To make use of it you should:
|
|
||||||
|
|
||||||
* Designate and bind a counter value by using ``count``, such value will
|
* Designate and bind a counter value with the name ``count``. This value will
|
||||||
be the one used to select the right plural form.
|
be the one used to select the right plural form.
|
||||||
|
|
||||||
* Specify both the singular and plural forms separating them with the
|
* Specify both the singular and plural forms separating them with the
|
||||||
``{% plural %}`` tag, which appears within ``{% blocktrans %}`` and
|
``{% plural %}`` tag within the ``{% blocktrans %}`` and
|
||||||
``{% endblocktrans %}``.
|
``{% endblocktrans %}`` tags.
|
||||||
|
|
||||||
An example::
|
An example::
|
||||||
|
|
||||||
@ -414,7 +413,7 @@ A more complex example::
|
|||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
When you both use the pluralization feature and bind values to local variables
|
When you both use the pluralization feature and bind values to local variables
|
||||||
in addition to the counter value, have in mind that the ``blocktrans``
|
in addition to the counter value, keep in mind that the ``blocktrans``
|
||||||
construct is internally converted to an ``ungettext`` call. This means the
|
construct is internally converted to an ``ungettext`` call. This means the
|
||||||
same :ref:`notes regarding ungettext variables <pluralization-var-notes>`
|
same :ref:`notes regarding ungettext variables <pluralization-var-notes>`
|
||||||
apply.
|
apply.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user