Hi,
I can't save my data in two locale.
I explain :
I use this translate behavior in my Post Model, in association with
Product Model:
class Post extends AppModel
{
var $name = 'Post';
var $actsAs = array('Translate' = array(
'body' = 'TranslationPostBody'));
var $hasMany = array('Comment' =
array(
'className' = 'Comment',
'foreignKey'= 'post_id'
));
}
class Product extends AppModel
{
var $name = 'Product';
var $hasOne = array(
'Post' =
array('className'= 'Post',
'conditions' = '',
'order'= '',
'dependent'= true,
'foreignKey' = 'product_id')
);
}
In my ProductsController class, I use the following code to save my
data :
if (!$this-Product-Post-save($this-data)) {
$this-flash('Echec de sauvegarde du
post','/products');
$error = true;
}
It works the first time, for instance when a use 'fre' locale. Data
are well stored in database, in i18N table.
The next time, I use 'eng' locale and It does not save my post. Why ?
I do not know how to debug this.
An idea ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---