Hi everybody,
AFAIK it is impossible, using the current TranslateBehavior, to insert
multiple values of one field at once.
Example.
I have an article (with its fields like created, user_id etc) and
define:
var $actsAs = array('Translate' =>
array('content'=>'LocaleContents'));
(to be able to fetch all translations as once as a hasMany relation)
Now in order to save ONE translation I would do:
<?=$form->create('') ?>
....
<?=$form->textarea('Article.content') ?>
<?=$form->end(__('Submit',true)) ?>
So far so good. But what if you want to save multiple languages?
First of all you have to update your translate.php in /cake/libs/model/
behaviors as shown in the bin: http://bin.cakephp.org/view/1939852942
Then just insert in the form fields like the following:
<?=$form->textarea('Article.content.LOCALE') ?>
examples:
- <?=$form->textarea('Article.content.en_us') ?>
- <?=$form->textarea('Article.content.de_de') ?>
etc.
please note. not throughly tested! i just came up with this idea.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---