public static function fromContentObject( eZContentObject $contentObject )
    {
        $set = new ezpContentFieldSet();
        $languages = $contentObject->availableLanguages();
        foreach( $languages as $language )
        {
            $set->childrenFieldSets[$language] =
                ezpContentFieldSet::fromDataMap( $contentObject->fetchDataMap( false, $language ) );
        }

        // this sequence is REALLY ugly
        reset( $languages );
        $set->setActiveLanguage( current( $languages ) );

        return $set;
    }