File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1064,9 +1064,15 @@ file
1064
1064
1065
1065
When executing the ``translation:extract `` command, it uses extractors to
1066
1066
extract translation messages from a file. By default, the Symfony Framework
1067
- has a :class: `Symfony\\ Bridge\\ Twig\\ Translation\\ TwigExtractor ` and a
1068
- :class: `Symfony\\ Component\\ Translation\\ Extractor\\ PhpExtractor `, which
1069
- help to find and extract translation keys from Twig templates and PHP files.
1067
+ has a :class: `Symfony\\ Bridge\\ Twig\\ Translation\\ TwigExtractor ` to find and
1068
+ extract translation keys from Twig templates.
1069
+
1070
+ If you also want to find and extract translation keys from PHP files, install
1071
+ the following dependency to activate the :class: `Symfony\\ Component\\ Translation\\ Extractor\\ PhpAstExtractor `:
1072
+
1073
+ .. code-block :: terminal
1074
+
1075
+ $ composer require nikic/php-parser
1070
1076
1071
1077
You can create your own extractor by creating a class that implements
1072
1078
:class: `Symfony\\ Component\\ Translation\\ Extractor\\ ExtractorInterface `
You can’t perform that action at this time.
0 commit comments