Skip to content

[Translation] Add note about how to override translation in chi… #5293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cookbook/bundles/override.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ 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 the loading order in ``AppKernel`` is parent > child.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] bundle, be sure [...]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and I think we should put the "parent > child" part in words like:

[...] sure that the parent bundle is loaded before the child bundle in the AppKernel class.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the trailing whitespaces

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

Expand Down