Extension\TranslationExtension (Bridge\Twig)
Symfony\Bridge\Twig\Extension\TranslationExtension
class TranslationExtension extends Twig_Extension
Provides integration of the Translation component with Twig.
Methods
__construct(TranslatorInterface $translator, Twig_NodeVisitorInterface $translationNodeVisitor = null) | ||
getTranslator() | ||
getFilters() {@inheritdoc} | ||
array | getTokenParsers() Returns the token parser instance to add to the existing list. | |
getNodeVisitors() {@inheritdoc} | ||
getTranslationNodeVisitor() | ||
trans($message, array $arguments = array(), $domain = null, $locale = null) | ||
transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null) | ||
getName() {@inheritdoc} |
Details
public __construct(TranslatorInterface $translator, Twig_NodeVisitorInterface $translationNodeVisitor = null)
public getTranslator()
public getFilters()
{@inheritdoc}
public array getTokenParsers()
Returns the token parser instance to add to the existing list.
public getNodeVisitors()
{@inheritdoc}
public getTranslationNodeVisitor()
public trans($message, array $arguments = array(), $domain = null, $locale = null)
public transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null)
public getName()
{@inheritdoc}
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bridge/Twig/Extension/TranslationExtension.html