Skip to content

Commit f87f5f4

Browse files
author
Pierre Maraitre
committed
Fix #5236 [Translation] specify additional translation loading paths
1 parent 09d9b29 commit f87f5f4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

book/translation.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ The translator service is accessible in PHP templates through the
334334
Translation Resource/File Names and Locations
335335
---------------------------------------------
336336

337-
Symfony looks for message files (i.e. translations) in the following locations:
337+
Symfony looks for message files (i.e. translations) in the following default locations:
338338

339339
* the ``app/Resources/translations`` directory;
340340

@@ -372,6 +372,18 @@ The choice of which loader to use is entirely up to you and is a matter of
372372
taste. The recommended option is to use ``xlf`` for translations.
373373
For more options, see :ref:`component-translator-message-catalogs`.
374374

375+
.. note::
376+
377+
The the paths at which Symfony will look for message files can be modified by adding
378+
your custom resources path in your config.yml:
379+
380+
.. code-block:: yml
381+
382+
framework:
383+
translator:
384+
paths:
385+
- %kernel.root_dir%/../vendor/Symfony/Component/Form/Resources/translations
386+
375387
.. note::
376388

377389
You can also store translations in a database, or any other storage by

0 commit comments

Comments
 (0)