Cakephp, i18n, Retrieve translation records for associated models
Posted
by ion
on Stack Overflow
See other posts from Stack Overflow
or by ion
Published on 2010-03-25T12:00:37Z
Indexed on
2010/03/25
12:03 UTC
Read the original article
Hit count: 335
Quoting from the cakephp Book (ver 1.3):
Note that only fields of the model you are directly doing
find
on will be translated. Models attached via associations won't be translated because triggering callbacks on associated models is currently not supported.
Has anyone come up with a solution for this???
If not could you give me some pointers concerning the following simple scenario.
I have 2 models: Project, Category.
Project HABTM Category
I have properly set up i18n table and I have a few entries in the db, all translated.
When I retrieve a project it does retrieve the translation but not the translated category because as it says in the cakephp book models attached via associations won't be translated.
Any help would be appreciated
© Stack Overflow or respective owner