Friday, July 12, 2013

Re: translate behavior - inserting in all languages at once?

Use search terms: multiple language forms

W dniu sobota, 6 lipca 2013 01:21:53 UTC+2 użytkownik K3 napisał:
Hi,

when i insert a record to a model that has Translate behavior attached, beside the record in models table, new records are inserted to the i18n table as well. 

for example 
in the post model i have:
'Translate' => array(
'title', 'description'
),

and when inserting new record it adds 2 records to the i18n table, one for title and one for description

if i then switch to second language, no records are shown cause there is no records in i18n for that language. This is not ok in my case because beside the title and description i have other fields (image, filename etc) that needs to stay the same for each language. SO i want the created record to be visible when i switch to another language.

technically what i want to achieve is to insert 2 records for each language. If the site is configured to work with 3 languages i want new 6 records in i18n table

is this possible?

thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: