Skip to content

Commit 67f5b49

Browse files
alexandre-dauboisjaviereguiluz
authored andcommitted
[Translation] Mention enabled_locales
1 parent e3d16d7 commit 67f5b49

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

translation.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ are located:
104104
;
105105
};
106106
107+
Additionally, you can enable only some locales instead of all of them. You can
108+
do this by using the
109+
:ref:`dedicated option <reference-translator-enabled-locales>` in your
110+
configuration.
111+
107112
.. _translation-basic:
108113

109114
Basic Translation
@@ -256,9 +261,10 @@ using the ``trans()`` method:
256261

257262
#. A catalog of translated messages is loaded from translation resources
258263
defined for the ``locale`` (e.g. ``fr_FR``). Messages from the
259-
:ref:`fallback locale <translation-fallback>` are also loaded and added to
260-
the catalog if they don't already exist. The end result is a large
261-
"dictionary" of translations.
264+
:ref:`fallback locale <translation-fallback>` and the
265+
:ref:`enabled locales <reference-translator-enabled-locales>` are also
266+
loaded and added to the catalog if they don't already exist. The end result
267+
is a large "dictionary" of translations.
262268

263269
#. If the message is located in the catalog, the translation is returned. If
264270
not, the translator returns the original message.

validation/translations.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ Now, create a ``validators`` catalog file in the ``translations/`` directory:
121121
];
122122
123123
You may need to clear your cache (even in the dev environment) after creating
124-
this file for the first time.
124+
this file for the first time. You may also need to enable the locale in your
125+
application configuration. This can be done by setting the
126+
:ref:`enabled_locales <reference-translator-enabled-locales>` option in
127+
your configuration files.
125128

126129
You can also use :class:`Symfony\\Component\\Translation\\TranslatableMessage` to build your violation message::
127130

0 commit comments

Comments
 (0)