Forums / Developer / Import multilanguage content to ez
Pierre Tissot
Wednesday 21 November 2007 7:40:14 am
Hello,
I need to import multi language via script to Ez. I can find several extension to import data, but none of them speak about language. Is there any help out there?
On my own i discover, and correct me if I'm wrong that to create an object in a specific language we use:
$contentObject =& $class->instantiate( $userID, $sectionID, false, 'fre-FR' );
but once the object is created I want to create in other languages how to proceed? with:
eZContentObjectTreeNode::subTree( array( 'Language' => 'fre-FR' )
Can somebody enligth me?
PiR
Laurent BOURREL
Wednesday 21 November 2007 8:27:16 am
Hi Pierre,
The idea is to create another version of your object. Try something like this(draft, not tested) :
$VersionAutre = $contentObject->createNewVersionIn("eng-UK","fre-FR"); $VersionAutre->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT ); $version =& $contentObject->version($VersionAutre); $VersionAutre->store();
Daniel Hoppe
Wednesday 21 November 2007 11:12:31 am
I had the same problem, so I wrote my own extension (nearly finished, only some trouble with Unicode image names and its not pure OOP).
I will clean the code and publish it if more people are interested in this kind of extension.If you can not wait please contact my by personal message.
Daniel
Heath
Wednesday 21 November 2007 11:45:59 am
Hello Daniel,
interest +1
Cheers,Heath
Brookins Consulting | http://brookinsconsulting.com/ Certified | http://auth.ez.no/certification/verify/380350 Solutions | http://projects.ez.no/users/community/brookins_consulting eZpedia community documentation project | http://ezpedia.org
Monday 26 November 2007 1:34:50 am
...Me too +9999 ;-)