You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: translation.rst
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -746,16 +746,18 @@ now use the following commands to push (upload) and pull (download) translations
746
746
# check out the command help to see its options (format, domains, locales, intl-icu, etc.)
747
747
$ php bin/console translation:pull --help
748
748
749
-
Creating custom Provider
750
-
~~~~~~~~~~~~~~~~~~~~~~~~
749
+
Creating Custom Providers
750
+
~~~~~~~~~~~~~~~~~~~~~~~~~
751
+
752
+
In addition to using Symfony's built-in translation providers, you can create
753
+
your own providers. To do so, you need to create two classes:
754
+
755
+
#. The first class must implement :class:`Symfony\\Component\\Translation\\Provider\\ProviderInterface`;
756
+
#. The second class needs to be a factory which will create instances of the first class. It must implement
757
+
:class:`Symfony\\Component\\Translation\\Provider\\ProviderFactoryInterface` (you can extend :class:`Symfony\\Component\\Translation\\Provider\\AbstractProviderFactory` to simplify its creation).
751
758
752
-
If you wish to create new Translation Provider, you need to create two classes.
753
-
First one must implement :class:`Symfony\\Component\\Translation\\Provider\\ProviderInterface`.
754
-
Second needs to be a factory, that will create instances of the first class. It must implement
0 commit comments