Ticket #14421: i18n.diff
File i18n.diff, 1.4 KB (added by , 14 years ago) |
---|
-
internationalization.txt
387 387 This is {{ book_t }} by {{ author_t }} 388 388 {% endblocktrans %} 389 389 390 This tag is also in charge of handling another functionality: Pluralization. 391 To make use of it you should: 390 This tag also provides for pluralization. To use it: 392 391 393 * Designate and bind a counter value by using ``count``, suchvalue will392 * Designate and bind a counter value with the name ``count``. This value will 394 393 be the one used to select the right plural form. 395 394 396 395 * Specify both the singular and plural forms separating them with the 397 ``{% plural %}`` tag , which appears within``{% blocktrans %}`` and398 ``{% endblocktrans %}`` .396 ``{% plural %}`` tag within the ``{% blocktrans %}`` and 397 ``{% endblocktrans %}`` tags. 399 398 400 399 An example:: 401 400 … … 414 413 {% endblocktrans %} 415 414 416 415 When you both use the pluralization feature and bind values to local variables 417 in addition to the counter value, havein mind that the ``blocktrans``416 in addition to the counter value, keep in mind that the ``blocktrans`` 418 417 construct is internally converted to an ``ungettext`` call. This means the 419 418 same :ref:`notes regarding ungettext variables <pluralization-var-notes>` 420 419 apply.