Ticket #6326: 6326_docs.diff
File 6326_docs.diff, 846 bytes (added by , 17 years ago) |
---|
-
docs/i18n.txt
287 287 constant strings. In those cases, just use ``_()`` syntax to specify a 288 288 translation string. Example:: 289 289 290 {% some_special_tag _("Page not found") value|yesno:_("yes,no ") %}290 {% some_special_tag _("Page not found") value|yesno:_("yes,no,maybe") %} 291 291 292 292 In this case, both the tag and the filter will see the already-translated 293 string, so they don't need to be aware of translations. 293 string, so they don't need to be aware of translations. Since 294 ``"yes,no,maybe"`` is a stock translation string in Django, the ``yesno`` tag 295 will receive ``"Ja,Nein,Vielleicht"`` as an argument if German is the active 296 language. 294 297 295 298 .. _Django templates: ../templates_python/ 296 299