Changeset 1241
- Timestamp:
- 11/15/05 07:51:31 (3 years ago)
- Files:
-
- django/trunk/django/templatetags/i18n.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/templatetags/i18n.py
r1230 r1241 164 164 def do_block_translate(parser, token): 165 165 """ 166 This will translate a block of text with parameters. 167 168 Format is like this:: 169 170 {% blocktrans with foo|filter as bar and baz|filter as boo %} 171 This is {{ bar }} and {{ boo }}. 172 {% endblocktrans %} 173 174 Additionally this supports pluralization:: 175 176 {% blocktrans count var|length as count %} 177 There is {{ count }} object. 178 {% plural %} 179 There are {{ count }} objects. 180 {% endblocktrans %} 181 182 This is much like ngettext, only in template syntax. 166 183 """ 167 184 class BlockTranslateParser(TokenParser):
