Ticket #6326: 6326_docs.diff

File 6326_docs.diff, 846 bytes (added by Antti Kaihola, 17 years ago)

suggested improvement for documentation

  • docs/i18n.txt

     
    287287constant strings. In those cases, just use ``_()`` syntax to specify a
    288288translation string. Example::
    289289
    290     {% some_special_tag _("Page not found") value|yesno:_("yes,no") %}
     290    {% some_special_tag _("Page not found") value|yesno:_("yes,no,maybe") %}
    291291
    292292In 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.
     293string, 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
     295will receive ``"Ja,Nein,Vielleicht"`` as an argument if German is the active
     296language.
    294297
    295298.. _Django templates: ../templates_python/
    296299
Back to Top