protected function _addLocaleLanguageData( MShop_Common_Manager_Interface $localeManager, array $data )
	{
		$this->_msg( 'Adding data for MShop locale languages', 1 );

		$languageItemManager = $localeManager->getSubManager( 'language', 'Default' );

		$num = $total = 0;

		foreach( $data as $dataset )
		{
			$total++;
			$languageItem = $languageItemManager->createItem();
			$languageItem->setCode( $dataset['id'] );
			$languageItem->setLabel( $dataset['label'] );
			$languageItem->setStatus( $dataset['status'] );

			try {
				$languageItemManager->saveItem( $languageItem );
				$num++;
			} catch( Exception $e ) { ; } // if language was already available
		}

		$this->_status( $num > 0 ? $num . '/' . $total : 'OK' );
	}
protected function _addLocaleLanguageData( MShop_Common_Manager_Interface $localeManager, array $data )
	{
		$this->_msg( 'Adding data for MShop locale languages', 1 );

		$languageItemManager = $localeManager->getSubManager( 'language', 'Default' );

		$num = $total = 0;

		foreach( $data as $dataset )
		{
			$total++;
			$languageItem = $languageItemManager->createItem();
			$languageItem->setCode( $dataset['id'] );
			$languageItem->setLabel( $dataset['label'] );
			$languageItem->setStatus( $dataset['status'] );

			try {
				$languageItemManager->saveItem( $languageItem );
				$num++;
			} catch( Exception $e ) { ; } // if language was already available
		}

		$this->_status( $num > 0 ? $num . '/' . $total : 'OK' );
	}
protected function _addLocaleLanguageData ( MShop_Common_Manager_Interface $ localeManager , array $ data ) { $ this -> _msg ( 'Adding data for MShop locale languages' , 1 ) ; $ languageItemManager = $ localeManager -> getSubManager ( 'language' , 'Default' ) ; $ num = $ total = 0 ; foreach ( $ data as $ dataset ) { $ total ++ ; $ languageItem = $ languageItemManager -> createItem ( ) ; $ languageItem -> setCode ( $ dataset [ 'id' ] ) ; $ languageItem -> setLabel ( $ dataset [ 'label' ] ) ; $ languageItem -> setStatus ( $ dataset [ 'status' ] ) ; try { $ languageItemManager -> saveItem ( $ languageItem ) ; $ num ++ ; } catch ( Exception $ e ) { ; } // if language was already available } $ this -> _status ( $ num > 0 ? $ num . '/' . $ total : 'OK' ) ; }
Adds locale language data.

@param MShop_Common_Manager_Interface $localeManager Locale manager
@param array $data Associative list of locale language data
Adds locale language data .