Skip to content

Commit

Permalink
Adding configuration examples for other formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Maraitre committed Dec 5, 2015
1 parent 2cabebe commit b3fa941
Showing 1 changed file with 40 additions and 8 deletions.
48 changes: 40 additions & 8 deletions book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,46 @@ For more options, see :ref:`component-translator-message-catalogs`.

.. note::

You can add other translation paths with the ``paths`` option in the configuration:

.. code-block:: yaml
framework:
translator:
paths:
- %kernel.root_dir%/../vendor/Symfony/Component/Form/Resources/translations
You can add other directories with the ``paths`` option in the configuration:

.. configuration-block::

.. code-block:: yaml
# app/config/config.yml
framework:
translator:
paths:
- "%kernel.root_dir%/../translations"
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
>
<framework:config>
<framework:translator>
<framework:path>%kernel.root_dir%/../translations</framework:path>
</framework:translator>
</framework:config>
</container>
.. code-block:: php
$container->loadFromExtension('framework', array(
'translator' => array(
'paths' => array(
'%kernel.root_dir%/../translations'
)
),
));
.. note::

Expand Down

0 comments on commit b3fa941

Please sign in to comment.