Skip to content

Commit e12e911

Browse files
committed
minor #5293 [Translation] Add note about how to override translation in chi… (zebba)
This PR was merged into the 2.3 branch. Discussion ---------- [Translation] Add note about how to override translation in chi… | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | #5193 Commits ------- 32d8203 Update override.rst f91e424 Update override.rst 13e3351 Update override.rst b80f46b [WIP] [Translation] Add note about how to override translation in child Bundle
2 parents c24862b + 32d8203 commit e12e911

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cookbook/bundles/override.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,11 @@ can override the translations from any translation file, as long as it is in
191191
The last translation file always wins. That means that you need to make
192192
sure that the bundle containing *your* translations is loaded after any
193193
bundle whose translations you're overriding. This is done in ``AppKernel``.
194+
Translation files are not aware of the inheritance tree and therefore
195+
unaware of their parent. If you want to override translations from the
196+
parent bundle, be sure that the parent bundle is loaded before the child
197+
bundle in the ``AppKernel`` class.
194198

195199
The file that always wins is the one that is placed in
196200
``app/Resources/translations``, as those files are always loaded last.
197-
198201
.. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides

0 commit comments

Comments
 (0)