protected function extractTable( $originalTable, $translationTable, $total )
	{
		$messages = [];

		for( $i = 0; $i < $total; ++$i )
		{
			$plural = null;
			$next = $i * 2;

			$this->seekto( $originalTable[$next + 2] );
			$original = $this->read( $originalTable[$next + 1] );
			$this->seekto( $translationTable[$next + 2] );
			$translated = $this->read( $translationTable[$next + 1] );

			if( $original === '' || $translated === '' ) { // Headers
				continue;
			}

			if( strpos( $original, "\x04" ) !== false ) {
				list( $context, $original ) = explode( "\x04", $original, 2 );
			}

			if( strpos( $original, "\000" ) !== false ) {
				list( $original, $plural ) = explode( "\000", $original );
			}

			if( $plural === null )
			{
				$messages[$original] = $translated;
				continue;
			}

			$messages[$original] = [];

			foreach( explode( "\x00", $translated ) as $idx => $value ) {
				$messages[$original][$idx] = $value;
			}
		}

		return $messages;
	}
protected function extractTable( $originalTable, $translationTable, $total )
	{
		$messages = [];

		for( $i = 0; $i < $total; ++$i )
		{
			$plural = null;
			$next = $i * 2;

			$this->seekto( $originalTable[$next + 2] );
			$original = $this->read( $originalTable[$next + 1] );
			$this->seekto( $translationTable[$next + 2] );
			$translated = $this->read( $translationTable[$next + 1] );

			if( $original === '' || $translated === '' ) { // Headers
				continue;
			}

			if( strpos( $original, "\x04" ) !== false ) {
				list( $context, $original ) = explode( "\x04", $original, 2 );
			}

			if( strpos( $original, "\000" ) !== false ) {
				list( $original, $plural ) = explode( "\000", $original );
			}

			if( $plural === null )
			{
				$messages[$original] = $translated;
				continue;
			}

			$messages[$original] = [];

			foreach( explode( "\x00", $translated ) as $idx => $value ) {
				$messages[$original][$idx] = $value;
			}
		}

		return $messages;
	}
protected function extractTable ( $ originalTable , $ translationTable , $ total ) { $ messages = [ ] ; for ( $ i = 0 ; $ i < $ total ; ++ $ i ) { $ plural = null ; $ next = $ i * 2 ; $ this -> seekto ( $ originalTable [ $ next + 2 ] ) ; $ original = $ this -> read ( $ originalTable [ $ next + 1 ] ) ; $ this -> seekto ( $ translationTable [ $ next + 2 ] ) ; $ translated = $ this -> read ( $ translationTable [ $ next + 1 ] ) ; if ( $ original === '' || $ translated === '' ) { // Headers continue ; } if ( strpos ( $ original , "\x04" ) !== false ) { list ( $ context , $ original ) = explode ( "\x04" , $ original , 2 ) ; } if ( strpos ( $ original , "\000" ) !== false ) { list ( $ original , $ plural ) = explode ( "\000" , $ original ) ; } if ( $ plural === null ) { $ messages [ $ original ] = $ translated ; continue ; } $ messages [ $ original ] = [ ] ; foreach ( explode ( "\x00" , $ translated ) as $ idx => $ value ) { $ messages [ $ original ] [ $ idx ] = $ value ; } } return $ messages ; }
Extracts the messages and their translations

@param array $originalTable MO table for original strings
@param array $translationTable MO table for translated strings
@param integer $total Total number of translations
@return array Associative list of original singular as keys and one or more translations as values
Extracts the messages and their translations