W3cubDocs

/Symfony 2.7

Symfony\Bridge\Twig\Translation\TwigExtractor

class TwigExtractor implements ExtractorInterface

TwigExtractor extracts translation messages from a twig template.

Methods

__construct(Twig_Environment $twig)
extract(string $directory, MessageCatalogue $catalogue)

Extracts translation messages from a template directory to the catalogue.

setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Details

public __construct(Twig_Environment $twig)

Parameters

Twig_Environment $twig

public extract(string $directory, MessageCatalogue $catalogue)

Extracts translation messages from a template directory to the catalogue.

Parameters

string $directory The path to look into
MessageCatalogue $catalogue The catalogue

public setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Parameters

string $prefix The prefix

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bridge/Twig/Translation/TwigExtractor.html