In my last post I presented a really weird way to add multiple translations.
Now I see that I messed a lot with this. I have managed to do it simpler
way:
<?php foreach ($languages as $language): ?>
<?php $iso = $language['iso639_3']; ?>
<?php echo "<div id=\"tab-$iso\">";?>
<?php echo $form->input("title.$iso", array ('label' => 'Tytuł')); ?>
<?php echo $form->input("text.$iso", array ('label' => 'Treść')); ?>
</div>
<?php endforeach; ?>
Now just a simple save() is enough to store the message and all it's
translations. Still however I have problems with 'edit'. When I put a
similar fragment in my edit.ctp I see the same translation in every tab. I
know that the reason is, that in the data sent to the 'edit' view the
News['title'] and News['text'] are simple values, not a locale => content
arrays. But what is the way to automatically transform the array? Was it
implemented in the 'translate' behavior, or do I have to implement this
transformation myself (where?). Please help
best regards,
Szymon
--
View this message in context:
http://www.nabble.com/Entering-several-translations-simultaneously-with-%27translate%27-behaviour-tp23636615p23669458.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---