class TranslationExtension extends AbstractExtension

Provides integration of the Translation component with Twig.

Methods

__construct(TranslatorInterface $translator, NodeVisitorInterface $translationNodeVisitor = null)

No description

getTranslator()

No description

getFilters()

{@inheritdoc}

AbstractTokenParser[]
getTokenParsers()

Returns the token parser instance to add to the existing list.

getNodeVisitors()

{@inheritdoc}

getTranslationNodeVisitor()

No description

trans($message, array $arguments = array(), $domain = null, $locale = null)

No description

transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null)

No description

getName()

{@inheritdoc}

Details

at line 35
__construct(TranslatorInterface $translator, NodeVisitorInterface $translationNodeVisitor = null)

Parameters

TranslatorInterface $translator
NodeVisitorInterface $translationNodeVisitor

at line 45
getTranslator()

at line 53
getFilters()

{@inheritdoc}

at line 66
AbstractTokenParser[] getTokenParsers()

Returns the token parser instance to add to the existing list.

Return Value

AbstractTokenParser[]

at line 85
getNodeVisitors()

{@inheritdoc}

at line 90
getTranslationNodeVisitor()

at line 95
trans($message, array $arguments = array(), $domain = null, $locale = null)

Parameters

$message
array $arguments
$domain
$locale

at line 100
transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null)

Parameters

$message
$count
array $arguments
$domain
$locale

at line 108
getName()

{@inheritdoc}