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 line 35
__construct(TranslatorInterface $translator, NodeVisitorInterface $translationNodeVisitor = null)

Parameters

TranslatorInterface $translator
NodeVisitorInterface $translationNodeVisitor

at line line 45
getTranslator()

at line line 53
getFilters()

{@inheritdoc}

at line line 66
AbstractTokenParser[] getTokenParsers()

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

Return Value

AbstractTokenParser[]

at line line 85
getNodeVisitors()

{@inheritdoc}

at line line 90
getTranslationNodeVisitor()

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

Parameters

$message
array $arguments
$domain
$locale

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

Parameters

$message
$count
array $arguments
$domain
$locale

at line line 108
getName()

{@inheritdoc}