Extracts translations from the given directory.
CLI command, that helps extracting translations in Symfony projects.
It's best to install this command using the
composer bin test req becklyn/translations-extractor
Call the command using the CLI:
./vendor/bin/extract-translations src/ templates/
As arguments, pass the list of directories to search in.
You can pass in extension names for twig, so that Twig doesn't complain about missing functions (or filters, etc.).
--mock-functionthe names of the functions to mock
--mock-filterthe names of the filters to mock
--mock-testthe names of the tests to mock
./vendor/bin/extract-translations src/ --mock-filter normalize --mock-filter normalize_another
There is a list of predefined mocks, take a look in