@@ -926,17 +926,18 @@ translation.extractor
926
926
**Purpose**: To register a custom service that extracts messages from a file
927
927
928
928
.. versionadded:: 2.1
929
- The ability to add message extractors is new in 2.1
929
+ The ability to add message extractors is new in Symfony 2.1.
930
930
931
931
When executing the ``translation:update`` command, it uses extractors to
932
932
extract translation messages from a file. By default, the Symfony2 framework
933
933
has a :class:`Symfony\\Bridge\\TwigBridge\\Translation\\TwigExtractor` and a
934
- :class:`Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor`.
934
+ :class:`Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor`, which
935
+ help to find and extract translation keys from Twig templates and PHP files.
935
936
936
- You can create your own extractor by creating a class which implements
937
+ You can create your own extractor by creating a class that implements
937
938
:class:`Symfony\\Component\\Translation\\Extractor\\ExtractorInterface` and
938
939
tagging the service with ``translation.extractor``. The tag has one required
939
- option: ``alias``, this defines the name of the extractor.
940
+ option: ``alias``, which defines the name of the extractor::
940
941
941
942
// src/Acme/DemoBundle/Translation/FooExtractor.php
942
943
namespace Acme\DemoBundle\Translation;
@@ -996,13 +997,13 @@ translation.dumper
996
997
**Purpose**: To register a custom service that dumps messages to a file
997
998
998
999
.. versionadded:: 2.1
999
- The ability to add message dumpers is new to 2.1
1000
+ The ability to add message dumpers is new in Symfony 2.1.
1000
1001
1001
1002
After an `Extractor <translation.extractor>`_ has extracted all messages from
1002
1003
the templates, the dumpers are executed to dump the messages to a translation
1003
1004
file in a specific format.
1004
1005
1005
- Symfony2 comes already with many dumpers:
1006
+ Symfony2 already comes with many dumpers:
1006
1007
1007
1008
* :class:`Symfony\\Component\\Translation\\Dumper\\CsvFileDumper`
1008
1009
* :class:`Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper`
@@ -1014,7 +1015,7 @@ Symfony2 comes already with many dumpers:
1014
1015
* :class:`Symfony\\Component\\Translation\\Dumper\\YamlFileDumper`
1015
1016
1016
1017
You can create your own dumper by extending
1017
- :class:`Symfony\\Component\\Translation\\DumperFileDumper ` or implementing
1018
+ :class:`Symfony\\Component\\Translation\\Dumper\\FileDumper ` or implementing
1018
1019
:class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface` and tagging
1019
1020
the service with ``translation.dumper``. The tag has one option: ``alias``
1020
1021
This is the name that's used to determine which dumper should be used.
0 commit comments