|trans

|trans

Twig Filter

The |trans and |trans_choice filters translate the value passed in using the applications localization configuration. The localization strings can be loaded by passing the default translation of your string.

___TWIG0___;

Replacing parameters in translation strings is possible by passing an array as the first argument. Every parameter is prefixed with a : character.

___TWIG0___

# Pluralization

The trans_choice function is used to process pluralized values.

___TWIG0___

The second argument can contain the parameters.

___TWIG0___

# Shorter Syntax

The _ and __ filters are interchangable with the trans and trans_choice filters.

___TWIG0___

___TWIG1___

# See Also