kernel/content/ezcontentoperationcollection.php
static public function updateInitialLanguage( $objectID, $newInitialLanguageID )
    {
        $object = eZContentObject::fetch( $objectID );
        $language = eZContentLanguage::fetch( $newInitialLanguageID );
        if ( $language and !$language->attribute( 'disabled' ) )
        {
            $object->setAttribute( 'initial_language_id', $newInitialLanguageID );
            $objectName = $object->name( false, $language->attribute( 'locale' ) );
            $object->setAttribute( 'name', $objectName );
            $object->store();

            if ( $object->isAlwaysAvailable() )
            {
                $object->setAlwaysAvailableLanguageID( $newInitialLanguageID );
            }

            $nodes = $object->assignedNodes();
            foreach ( $nodes as $node )
            {
                $node->updateSubTreePath();
            }
        }

        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );

        return array( 'status' => true );
    }
static public function updateInitialLanguage( $objectID, $newInitialLanguageID )
    {
        $object = eZContentObject::fetch( $objectID );
        $language = eZContentLanguage::fetch( $newInitialLanguageID );
        if ( $language and !$language->attribute( 'disabled' ) )
        {
            $object->setAttribute( 'initial_language_id', $newInitialLanguageID );
            $objectName = $object->name( false, $language->attribute( 'locale' ) );
            $object->setAttribute( 'name', $objectName );
            $object->store();

            if ( $object->isAlwaysAvailable() )
            {
                $object->setAlwaysAvailableLanguageID( $newInitialLanguageID );
            }

            $nodes = $object->assignedNodes();
            foreach ( $nodes as $node )
            {
                $node->updateSubTreePath();
            }
        }

        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );

        return array( 'status' => true );
    }
static public function updateInitialLanguage ( $ objectID , $ newInitialLanguageID ) { $ object = eZContentObject :: fetch ( $ objectID ) ; $ language = eZContentLanguage :: fetch ( $ newInitialLanguageID ) ; if ( $ language and ! $ language -> attribute ( 'disabled' ) ) { $ object -> setAttribute ( 'initial_language_id' , $ newInitialLanguageID ) ; $ objectName = $ object -> name ( false , $ language -> attribute ( 'locale' ) ) ; $ object -> setAttribute ( 'name' , $ objectName ) ; $ object -> store ( ) ; if ( $ object -> isAlwaysAvailable ( ) ) { $ object -> setAlwaysAvailableLanguageID ( $ newInitialLanguageID ) ; } $ nodes = $ object -> assignedNodes ( ) ; foreach ( $ nodes as $ node ) { $ node -> updateSubTreePath ( ) ; } } eZContentCacheManager :: clearContentCacheIfNeeded ( $ objectID ) ; return array ( 'status' => true ) ; }
Updates an contentobject's initial language

@param int $objectID
@param int $newInitialLanguageID

@return array An array with operation status, always true
Updates an contentobject s initial language