diff --git a/translation.rst b/translation.rst index 33549a66f56..bc58246c914 100644 --- a/translation.rst +++ b/translation.rst @@ -104,6 +104,11 @@ are located: ; }; +Additionally, you can enable only some locales instead of all of them. You can +do this by using the +:ref:`dedicated option ` in your +configuration. + .. _translation-basic: Basic Translation @@ -256,9 +261,10 @@ using the ``trans()`` method: #. A catalog of translated messages is loaded from translation resources defined for the ``locale`` (e.g. ``fr_FR``). Messages from the - :ref:`fallback locale ` are also loaded and added to - the catalog if they don't already exist. The end result is a large - "dictionary" of translations. + :ref:`fallback locale ` and the + :ref:`enabled locales ` are also + loaded and added to the catalog if they don't already exist. The end result + is a large "dictionary" of translations. #. If the message is located in the catalog, the translation is returned. If not, the translator returns the original message. diff --git a/validation/translations.rst b/validation/translations.rst index 5b37fb30aca..e43b2f2da7a 100644 --- a/validation/translations.rst +++ b/validation/translations.rst @@ -121,7 +121,10 @@ Now, create a ``validators`` catalog file in the ``translations/`` directory: ]; You may need to clear your cache (even in the dev environment) after creating -this file for the first time. +this file for the first time. You may also need to enable the locale in your +application configuration. This can be done by setting the +:ref:`enabled_locales ` option in +your configuration files. You can also use :class:`Symfony\\Component\\Translation\\TranslatableMessage` to build your violation message::