We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 185af22 commit 0f0c893Copy full SHA for 0f0c893
translation.rst
@@ -403,6 +403,15 @@ The ``trans`` filter can be used to translate *variable texts* and complex expre
403
{{ message|trans|raw }}
404
{{ '<h3>bar</h3>'|trans|raw }}
405
406
+.. tip::
407
+
408
+ When a number is provided as a parameter named "%count%", the message is parsed for plural
409
+ forms and a translation is chosen according to this number using the following rules:
410
411
+ .. code-block:: twig
412
413
+ {{ message|trans({'%name%': 'Fabien', '%count%' => 1}, 'app') }}
414
415
.. tip::
416
417
You can set the translation domain for an entire Twig template with a single tag:
0 commit comments