Hi zwobot,
> My Model:
> <?php
> class Post extends AppModel {
>
> var $name = 'Post';
>
> var $actsAs = array('Translate' => array('title' =>
> 'TranslationsAbstract', 'body' => 'TranslationsAbstract'));
>
> }
>
> ?>
I'm also still figuring out how to use translation in add & edit
action. Look at my new post:
http://groups.google.com/group/cake-php/browse_thread/thread/c5669402b8cc3165
, would be nice if someone could reply on this post to...
Anyway your model definition $actAs part should look something like
this:
var $actsAs = array('Translate' => array('title'
=>'TranslationsTitle', 'body' => 'TranslationsBody'));
TranslationsTitle & TranslationsBody are just labels you make up. Only
requirement is they are unique.
This will give you two extra arrays named TranslationsTitle &
TranslationsBody.
Example from my other post (looks slightly different from yours,
TransContent & TransTitle are used here)
[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
)
)
)
Succes
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---