Hello Thomas,

>> How can I create a content object in other than the default language of the 
>> siteaccess from php code?

There are 2 ways in fact:

Either you run the cronjob which creates your objects from a different 
siteaccess which has a different default language with the -s option

>>> php runcronjobs.php your_cronjob_name -s siteaccess

The second option is to translate your ojects directly when importing your data 
in other languages:

$locale = 'eng-GB';
while ( list( $key, $attribute ) = each( $dataMap ) )
{
    $attributeValue = 'la valeur de mon attribut en anglais';
    $translatedAttribute = $attribute->translateTo( $locale );
    $translatedAttribute->fromString( $attributeValue );
    $translatedAttribute->store();
}

$operationResult = eZOperationHandler::execute( 'content', 'publish', array( 
'object_id' => $contentObjectID,
                                                                             
'version' => 1 ) );

Good luck with this,
Have a nice day,

Paul


-- 
Sdk-public mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/sdk-public

Reply via email to