From f87f5f41344b140b055fab8c36d63cf1f97b9f51 Mon Sep 17 00:00:00 2001 From: Pierre Maraitre Date: Sat, 5 Dec 2015 09:51:07 +0100 Subject: [PATCH] Fix #5236 [Translation] specify additional translation loading paths --- book/translation.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/book/translation.rst b/book/translation.rst index 7cd2fe0e8a9..9d601817ff0 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -334,7 +334,7 @@ The translator service is accessible in PHP templates through the Translation Resource/File Names and Locations --------------------------------------------- -Symfony looks for message files (i.e. translations) in the following locations: +Symfony looks for message files (i.e. translations) in the following default locations: * the ``app/Resources/translations`` directory; @@ -372,6 +372,18 @@ The choice of which loader to use is entirely up to you and is a matter of taste. The recommended option is to use ``xlf`` for translations. For more options, see :ref:`component-translator-message-catalogs`. +.. note:: + + The the paths at which Symfony will look for message files can be modified by adding + your custom resources path in your config.yml: + + .. code-block:: yml + + framework: + translator: + paths: + - %kernel.root_dir%/../vendor/Symfony/Component/Form/Resources/translations + .. note:: You can also store translations in a database, or any other storage by