8000 Merge pull request #1136 from michelsalib/trans_default_domain · symfony/symfony-docs@4525397 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4525397

Browse files
committed
Merge pull request #1136 from michelsalib/trans_default_domain
Document trans_default_domain usage
2 parents f67a1e0 + 121c29e commit 4525397

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

book/translation.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,18 @@ texts* and complex expressions:
796796
{# but static strings are never escaped #}
797797
{{ '<h3>foo</h3>'|trans }}
798798
799+
.. versionadded:: 2.1
800+
801+
You can now set translation domain for an entire twig template with one
802+
single tag:
803+
804+
.. code-block:: jinja
805+
806+
{% trans_default_domain "app" %}
807+
808+
Note that this is only influencing the current template, not the included
809+
ones in order to avoid side effects.
810+
799811
PHP Templates
800812
~~~~~~~~~~~~~
801813

0 commit comments

Comments
 (0)
0