Skip to content

Commit

Permalink
minor #5293 [Translation] Add note about how to override translation …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
weaverryan committed Jun 27, 2015
2 parents c24862b + 32d8203 commit e12e911
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cookbook/bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,11 @@ can override the translations from any translation file, as long as it is in
The last translation file always wins. That means that you need to make
sure that the bundle containing *your* translations is loaded after any
bundle whose translations you're overriding. This is done in ``AppKernel``.
Translation files are not aware of the inheritance tree and therefore
unaware of their parent. If you want to override translations from the
parent bundle, be sure that the parent bundle is loaded before the child
bundle in the ``AppKernel`` class.

The file that always wins is the one that is placed in
``app/Resources/translations``, as those files are always loaded last.

.. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides

0 comments on commit e12e911

Please sign in to comment.