Skip to content

Commit 24d1ac3

Browse files
author
Alexander Smishlajev
committed
"Information available to templates": i18n
1 parent 1170f53 commit 24d1ac3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

doc/customizing.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.140 $
5+
:Version: $Revision: 1.141 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1598,6 +1598,20 @@ The following variables are available to templates.
15981598
**true**, **false**
15991599
Boolean constants that may be used in `templating expressions`_
16001600
instead of ``python:1`` and ``python:0``.
1601+
**i18n**
1602+
Internationalization service, providing two string translation methods:
1603+
1604+
**gettext** (*message*)
1605+
Return the localized translation of message
1606+
**ngettext** (*singular*, *plural*, *number*)
1607+
Like ``gettext()``, but consider plural forms. If a translation
1608+
is found, apply the plural formula to *number*, and return the
1609+
resulting message (some languages have more than two plural forms).
1610+
If no translation is found, return singular if *number* is 1;
1611+
return plural otherwise.
1612+
1613+
This function requires python2.3; in earlier python versions
1614+
may not work as expected.
16011615

16021616
The context variable
16031617
~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)