Friday 16 June 2006 1:55:00 am - 8 replies
Kristof Coomans
Friday 16 June 2006 1:58:35 am
Hi Carlos
Which version of eZ publish are you using? 3.8?
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
Carlos Revillo
Friday 16 June 2006 2:03:48 am
Yes. 3.8.
Saturday 17 June 2006 1:55:29 am
After publishing the Spanish version, you can create a new version with an English translation:
$version = $obj->createNewVersionIn( $selectedEditLanguage ); $version->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT ); $version->store();
$selectedEditLanguage is in your case "eng-GB".
Now fill the attributes of this new version and publish it.
Saturday 17 June 2006 10:26:00 am
Great!. Thanks so much!.
Martin Jerie
Friday 27 October 2006 2:10:01 am
Please can you show me rest of the code for publish translation
Because when i use code from Carlos example:
$operationResult = eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $contentObjectID, 'version' => 1 ) );
translation is only draft - how to publish it?
Martin
Friday 27 October 2006 5:23:43 am
I found itI have to change 'version' => 1 to 'version' => 2
Friday 27 October 2006 5:48:01 am
To be correct in any case, use <i>$version->attribute( 'version' )</i>
Cheers
Tuesday 23 October 2007 7:38:29 pm
Hi. I use V 3.10 and "createNewVersionIn" works fine for one additional language.If I use main language and 2 additional languages ($a and $b):
// part A $version = $obj->createNewVersionIn( $a ); $version->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT ); $version->store(); ... // part B $version = $obj->createNewVersionIn( $b ); $version->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT ); $version->store();
part B always override part A.
You must be logged in to post messages in this topic!