Ticket #3970: i18n-docs_3970.patch

File i18n-docs_3970.patch, 869 bytes (added by axiak@…, 18 years ago)

Corresponding documentation

  • i18n.txt

     
    211211
    212212    <title>{% trans "value" noop %}</title>
    213213
     214If you want to place the output into a context variable, use the ``as`` option::
     215    <title>
     216    {% trans "value" as translated_title %}
     217    {{ translated_title|upper }}
     218    </title>
     219
     220This will allow you to use the translated text as inputs to filters later on. You can still use the ``noop`` option with this::
     221
     222    <title>
     223    {% trans "value" as translated_title noop %}
     224    {{ translated_title|upper }}
     225    </title>
     226
    214227It's not possible to use template variables in ``{% trans %}`` -- only constant
    215228strings, in single or double quotes, are allowed. If your translations require
    216229variables (placeholders), use ``{% blocktrans %}``. Example::
Back to Top