Skip to content

Commit 37a6d6d

Browse files
committed
minor #7392 See #7362 bundles/override > Rewrite translations block (alexislefebvre)
This PR was merged into the 2.7 branch. Discussion ---------- See #7362 bundles/override > Rewrite translations block Fixes #7362. Commits ------- f0acb9e See #7362 bundles/override > Rewrite translations block
2 parents 364b032 + f0acb9e commit 37a6d6d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

bundles/override.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,11 @@ can override the translations from any translation file, as long as it is in
155155

156156
.. caution::
157157

158-
The last translation file always wins. That means that you need to make
159-
sure that the bundle containing *your* translations is loaded after any
158+
Translation files are not aware of :doc:`bundle inheritance </bundles/inheritance>`.
159+
If you want to override translations from the parent bundle or another bundle,
160+
make sure that the bundle containing *your* translations is loaded after any
160161
bundle whose translations you're overriding. This is done in ``AppKernel``.
161162

162-
Translation files are also not aware of :doc:`bundle inheritance </bundles/inheritance>`.
163-
If you want to override translations from the parent bundle, be sure that the
164-
parent bundle is loaded before the child bundle in the ``AppKernel`` class.
165-
166-
The file that always wins is the one that is placed in
167-
``app/Resources/translations``, as those files are always loaded last.
163+
Finally, translations located in ``app/Resources/translations`` will override
164+
all the other translations since those files are always loaded last.
168165
.. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides

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