private function _getTranslations( $domain )
	{
		if( !isset( $this->_translations[$domain] ) )
		{
			if( !isset( $this->_translationSources[$domain] ) )
			{
				$msg = sprintf( 'No translation directory for domain "%1$s" available', $domain );
				throw new MW_Translation_Exception( $msg );
			}

			// Reverse locations so the former gets not overwritten by the later
			$locations = array_reverse( $this->_getTranslationFileLocations( $this->_translationSources[$domain], $this->getLocale() ) );

			foreach( $locations as $location )
			{
				if( ( $content = file_get_contents( $location ) ) === false ) {
					throw new MW_Translation_Exception( 'No translation file "%1$s" available', $location );
				}

				if( ( $content = unserialize( $content ) ) === false ) {
					throw new MW_Translation_Exception( 'Invalid content in translation file "%1$s"', $location );
				}

				$this->_translations[$domain][] = $content;
			}
		}

		return $this->_translations[$domain];
	}
private function _getTranslations( $domain )
	{
		if( !isset( $this->_translations[$domain] ) )
		{
			if( !isset( $this->_translationSources[$domain] ) )
			{
				$msg = sprintf( 'No translation directory for domain "%1$s" available', $domain );
				throw new MW_Translation_Exception( $msg );
			}

			// Reverse locations so the former gets not overwritten by the later
			$locations = array_reverse( $this->_getTranslationFileLocations( $this->_translationSources[$domain], $this->getLocale() ) );

			foreach( $locations as $location )
			{
				if( ( $content = file_get_contents( $location ) ) === false ) {
					throw new MW_Translation_Exception( 'No translation file "%1$s" available', $location );
				}

				if( ( $content = unserialize( $content ) ) === false ) {
					throw new MW_Translation_Exception( 'Invalid content in translation file "%1$s"', $location );
				}

				$this->_translations[$domain][] = $content;
			}
		}

		return $this->_translations[$domain];
	}
private function _getTranslations ( $ domain ) { if ( ! isset ( $ this -> _translations [ $ domain ] ) ) { if ( ! isset ( $ this -> _translationSources [ $ domain ] ) ) { $ msg = sprintf ( 'No translation directory for domain "%1$s" available' , $ domain ) ; throw new MW_Translation_Exception ( $ msg ) ; } // Reverse locations so the former gets not overwritten by the later $ locations = array_reverse ( $ this -> _getTranslationFileLocations ( $ this -> _translationSources [ $ domain ] , $ this -> getLocale ( ) ) ) ; foreach ( $ locations as $ location ) { if ( ( $ content = file_get_contents ( $ location ) ) === false ) { throw new MW_Translation_Exception ( 'No translation file "%1$s" available' , $ location ) ; } if ( ( $ content = unserialize ( $ content ) ) === false ) { throw new MW_Translation_Exception ( 'Invalid content in translation file "%1$s"' , $ location ) ; } $ this -> _translations [ $ domain ] [ ] = $ content ; } } return $ this -> _translations [ $ domain ] ; }
Gets, adds and loads necessary translation data if it was not set befor.

@param string $domain Translation domain
@return array Returns a list with key value pairs for each domain.
@throws MW_Translation_Exception Throws exception on initialization of the translation
Gets adds and loads necessary translation data if it was not set befor .