:), That is why i have created this behavior,
so you DON NOT have to insert translations for an article into the i18n tables "simultaneously" when adding an Article/Post or whatever Translate It http://cakeforge.org/snippet/detail.php?type=snippet&id=195 guys. please wait for updates On Jul 12, 4:01 pm, zwobot <[EMAIL PROTECTED]> wrote: > > Ok this works. Some issues: > > - When a translation for a language is not already in the i18n / > > i18n_content tables, a errors occurs when saving. Cake tries to insert > > a new record in the article table for each language not already > > present. Expected behaviour would be to only create the i18n & > > i18n_content records. > > Exactly, this is the problem I have. How to get the translations for > an article into the i18n tables "simultaneously" when adding an > Article/Post or whatever? > > I wonder how you got this data into your database: > > > INSERT INTO `i18n_content` (`id`, `content`) VALUES > > (107, 'English title'), > > (108, 'English content'), > > (109, 'French titel'), > > (110, 'French content'), > > (111, 'Dutch title'), > > (112, 'Dutch content'); > > INSERT INTO `i18n` (`id`, `locale`, `i18n_content_id`, `model`, > > `row_id`, `field`) VALUES > > (91, 'eng', 107, 'Article', 1, 'title'), > > (92, 'eng', 108, 'Article', 1, 'content'), > > (93, 'fra', 109, 'Article', 1, 'title'), > > (94, 'fra', 110, 'Article', 1, 'content'), > > (95, 'dut', 111, 'Article', 1, 'title'), > > (96, 'dut', 112, 'Article', 1, 'content'); > > INSERTed manually by yourself I suppose. > > There are some tings in your edit function I do not understand > oleonav. > In my edit function I just use $this->Post->save($this->data) and > maybe setting the locale beforehand to tell cake which translation to > edit. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---