Lines Matching refs:to
7 The ``i18n`` extension adds `gettext`_ support to Twig. It defines one tag,
12 You need to register this extension before using the ``trans`` block::
20 // Set language to French
39 Use the ``trans`` block to mark parts in the template as translatable:
65 If you need to apply filters to the variables, you first need to assign the
66 result to a variable:
86 The ``plural`` tag should provide the ``count`` used to select the right
103 configure the ``gettext`` parser to get something like this: ``xgettext --add-comments=notes``
105 Within an expression or in a tag, you can use the ``trans`` filter to translate
122 {# assign the translation to a temporary variable #}
137 If you use the Twig I18n extension, you will probably need to extract the
151 But there is a simple workaround: as Twig converts templates to
155 templates. Here is a simple example to get you started::
161 // force auto-reload to always have the latest version of the template
185 Another workaround is to use `Twig Gettext Extractor`_ and extract the template