@@ -129,6 +129,54 @@ own templates directory (or directories):
129129 ),
130130 ));
131131
132+ Override the Translations Directory
133+ -----------------------------------
134+
135+ If your translation files are not stored in the default ``translations/ ``
136+ directory, use the :ref: `framework.translator.paths <reference-translator-paths >`
137+ configuration option to define your own translations directory (or directories):
138+
139+ .. configuration-block ::
140+
141+ .. code-block :: yaml
142+
143+ # config/packages/translation.yaml
144+ framework :
145+ translator :
146+ # ...
147+ paths : ["%kernel.project_dir%/i18n"]
148+
149+ .. code-block :: xml
150+
151+ <!-- config/packages/translation.xml -->
152+ <?xml version =" 1.0" ?>
153+ <container xmlns =" http://symfony.com/schema/dic/services"
154+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
155+ xmlns : twig =" http://symfony.com/schema/dic/twig"
156+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
157+ http://symfony.com/schema/dic/services/services-1.0.xsd
158+ http://symfony.com/schema/dic/twig
159+ http://symfony.com/schema/dic/twig/twig-1.0.xsd" >
160+
161+ <framework : config >
162+ <framework : translator >
163+ <framework : path >%kernel.project_dir%/i18n</framework : path >
164+ </framework : translator >
165+ </framework : config >
166+
167+ </container >
168+
169+ .. code-block :: php
170+
171+ // config/packages/translation.php
172+ $container->loadFromExtension('framework', array(
173+ 'translator' => array(
174+ 'paths' => array(
175+ '%kernel.project_dir%/i18n',
176+ ),
177+ ),
178+ ));
179+
132180 .. _override-web-dir :
133181.. _override-the-web-directory :
134182
0 commit comments