Tuesday, August 31, 2010

Re: Question about I18n and relation

Hi,

El 30/08/2010, a las 16:56, MoAX escribió:

> Informations about my category are retrieved and its title from the
> i18n table too. But items title and description (in the i18n table)
> are not retrieved while their informations are.

Is a limitation in the Translate Behavior. Related models are not
translated.

There are several workarounds. For example:

$this->Category->recursive = -1:
$category = $this->Category->read(null, $id)
$items = $this->Category->Item->find('all', array('conditions' =>
array('category_id' => $id)));


Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: