class TranslationExtension extends AbstractExtension

Provides integration of the Translation component with Twig.

Methods

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

Parameters

TranslatorInterface $translator
NodeVisitorInterface $translationNodeVisitor

at line line 41
getTranslator()

at line line 49
getFilters()

{@inheritdoc}

at line line 62
AbstractTokenParser[] getTokenParsers()

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

Return Value

AbstractTokenParser[]

at line line 81
getNodeVisitors()

{@inheritdoc}

at line line 86
getTranslationNodeVisitor()

at line line 91
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 112
getName()

{@inheritdoc}