Ticket #3970: i18n-docs_3970.patch
File i18n-docs_3970.patch, 869 bytes (added by , 18 years ago) |
---|
-
i18n.txt
211 211 212 212 <title>{% trans "value" noop %}</title> 213 213 214 If 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 220 This 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 214 227 It's not possible to use template variables in ``{% trans %}`` -- only constant 215 228 strings, in single or double quotes, are allowed. If your translations require 216 229 variables (placeholders), use ``{% blocktrans %}``. Example::