Skip to content

Commit 62329bc

Browse files
committed
[Translation] Update the PHP extraction information for Symfony 7.0
1 parent 1fc0bed commit 62329bc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

reference/dic_tags.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,9 +1064,15 @@ file
10641064

10651065
When executing the ``translation:extract`` command, it uses extractors to
10661066
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
10701076
10711077
You can create your own extractor by creating a class that implements
10721078
:class:`Symfony\\Component\\Translation\\Extractor\\ExtractorInterface`

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy