> There's ArticleVersion model, which have this fields: id, name:
> varchar, introduction:text, created:datetime.
>
> I've defined to name and introduction fields to be translatable:
> var $actsAs = array('Translate' => array('name', 'introduction'));

Table for ArticleVersion model should not contain fields 'name' and
'introduction', these fields are virtual.

> Quick adding a new ArticleVersion is made by filling just name field
> and submitting, and introduction doesn't need to be fulfilled.
> ...
> It returns no rows, because there's `I18n__introduction`.`locale` =
> 'pol' in where statement, and the introtuction field is't saved in
> Quick add operation.

Fastest possible way is save introduction as empty string in Quick add
operation.

> But I don't know how to make $locale variable an array?

>From controller, $this->ArticleVersion->locale = array('pol') should
do the trick, although purpose of possibility to pass array of locales
is - handle cases, where one wants record(s) preferrably in some
locale, but if this translation doesn't exist, provide fallback locale
(s) to use.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to