@@ -334,7 +334,7 @@ The translator service is accessible in PHP templates through the
334334Translation 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,49 @@ The choice of which loader to use is entirely up to you and is a matter of
372372taste. The recommended option is to use ``xlf `` for translations.
373373For more options, see :ref: `component-translator-message-catalogs `.
374374
375+ .. note ::
376+
377+ You can add other directories with the ``paths `` option in the configuration:
378+
379+ .. configuration-block ::
380+
381+ .. code-block :: yaml
382+
383+ # app/config/config.yml
384+ framework :
385+ translator :
386+ paths :
387+ - " %kernel.root_dir%/../translations"
388+
389+ .. code-block :: xml
390+
391+ <?xml version =" 1.0" encoding =" UTF-8" ?>
392+ <container xmlns =" http://symfony.com/schema/dic/services"
393+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
394+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-Instance"
395+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
396+ http://symfony.com/schema/dic/services/services-1.0.xsd
397+ http://symfony.com/schema/dic/symfony
398+ http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
399+ >
400+
401+ <framework : config >
402+ <framework : translator >
403+ <framework : path >%kernel.root_dir%/../translations</framework : path >
404+ </framework : translator >
405+ </framework : config >
406+ </container >
407+
408+ .. code-block :: php
409+
410+ $container->loadFromExtension('framework', array(
411+ 'translator' => array(
412+ 'paths' => array(
413+ '%kernel.root_dir%/../translations'
414+ )
415+ ),
416+ ));
417+
375418 .. note ::
376419
377420 You can also store translations in a database, or any other storage by
0 commit comments