Forums / Developer / Object translation / Comment51347
Olivier Versanne
Monday 13 July 2009 7:42:04 am
Hi!
I'm doing this:
$lang = 'cat-ES'; // $swse is an ezContentObject if(!in_array($lang, $swse->availableLanguages())){ // if the language doesn't exist $dataMap = &$swse->dataMap(); foreach($dataMap as $k => $v){ $truc[$k] = $dataMap[$k]->translateTo($lang); $truc[$k]->store(); } } $swse->setCurrentLanguage($lang); $swse->store(); [...]
And, in admin interface, eZ tell me:
Translations [2] Existing languages Language Locale Main English (WorldWide) eng-WW
There are 2 existing translation, but it shows me only one.
So that doesn't work... :-(
***
And, another question, I saw in ez's documentation that method "translateTo()" was deprecated. What should we use now?
Thanks for your help!