File tree Expand file tree Collapse file tree 1 file changed +40
-8
lines changed Expand file tree Collapse file tree 1 file changed +40
-8
lines changed Original file line number Diff line number Diff line change @@ -374,14 +374,46 @@ For more options, see :ref:`component-translator-message-catalogs`.
374374
375375.. note ::
376376
377- You can add other translation paths with the ``paths `` option in the configuration:
378-
379- .. code-block :: yaml
380-
381- framework :
382- translator :
383- paths :
384- - %kernel.root_dir%/../vendor/Symfony/Component/Form/Resources/translations
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+ ));
385417
386418 .. note ::
387419
You can’t perform that action at this time.
0 commit comments