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.
2 parents 683c628 + b8debc5 commit e349a74Copy full SHA for e349a74
translation.rst
@@ -410,6 +410,15 @@ The ``trans`` filter can be used to translate *variable texts* and complex expre
410
{{ message|trans|raw }}
411
{{ '<h3>bar</h3>'|trans|raw }}
412
413
+.. tip::
414
+
415
+ When a number is provided as a parameter named "%count%", the message is parsed for plural
416
+ forms and a translation is chosen according to this number using the following rules:
417
418
+ .. code-block:: twig
419
420
+ {{ message|trans({'%name%': 'Fabien', '%count%' => 1}, 'app') }}
421
422
.. tip::
423
424
You can set the translation domain for an entire Twig template with a single tag:
0 commit comments