Hi there,
In my Article model two translated fields are used, title &
content.The Translation behavior is used. The Article model looks like
this:
class Article extends AppModel {
var $name = 'Article';
var $actsAs = array('Translate' => array('title' =>
'TransTitle','content' => 'TransContent'));
}
In an edit action the following data is send to the view:
[Article] => Array
(
[id] => 1
[created_at] => 2007-07-04 15:33:56
[active] => yes
[locale] => eng
[title] => English title
[content] => English content
)
[TransTitle] => Array
(
[0] => Array
(
[id] => 93
[locale] => fra
[i18n_content_id] => 109
[model] => Article
[row_id] => 1
[field] => title
[Content] => Array
(
[id] => 109
[content] => Titre en francais
)
)
[1] => Array
(
[id] => 91
[locale] => eng
[i18n_content_id] => 107
[model] => Article
[row_id] => 1
[field] => title
[Content] => Array
(
[id] => 107
[content] => English title
)
)
)
[TransContent] => Array
(
[0] => Array
(
[id] => 94
[locale] => fra
[i18n_content_id] => 110
[model] => Article
[row_id] => 1
[field] => content
[Content] => Array
(
[id] => 110
[content] => Contenu en francais
)
)
[1] => Array
(
[id] => 92
[locale] => eng
[i18n_content_id] => 108
[model] => Article
[row_id] => 1
[field] => content
[Content] => Array
(
[id] => 108
[content] => English content
)
)
)
Ok so far so good. Two questions:
Q1. I want all translated fields available in one form. How do I adres
the translated fields in the view with the help of the form helper?
$form->input('TransTitle.content') or $form-
>input('TransTitle.eng.content') both do display a formfield however
no value in it.
Q2. How do I use the submitted data in the edit or add action? How are
they named? Can the submitted data for all translated data be
validated and saved in one call?
Thanks again!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---