Skip to content

Commit b3fa941

Browse files
author
Pierre Maraitre
committed
Adding configuration examples for other formats
1 parent 2cabebe commit b3fa941

File tree

1 file changed

+40
-8
lines changed

1 file changed

+40
-8
lines changed

book/translation.rst

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy