function addMagicWordsByLang( $newWords ) {
		$code = $this->getCode();
		$fallbackChain = array();
		while ( $code && !in_array( $code, $fallbackChain ) ) {
			$fallbackChain[] = $code;
			$code = self::getFallbackFor( $code );
		}
		if ( !in_array( 'en', $fallbackChain ) ) {
			$fallbackChain[] = 'en';
		}
		$fallbackChain = array_reverse( $fallbackChain );
		foreach ( $fallbackChain as $code ) {
			if ( isset( $newWords[$code] ) ) {
				$this->mMagicExtensions = $newWords[$code] + $this->mMagicExtensions;
			}
		}
	}
function addMagicWordsByLang( $newWords ) {
		$code = $this->getCode();
		$fallbackChain = array();
		while ( $code && !in_array( $code, $fallbackChain ) ) {
			$fallbackChain[] = $code;
			$code = self::getFallbackFor( $code );
		}
		if ( !in_array( 'en', $fallbackChain ) ) {
			$fallbackChain[] = 'en';
		}
		$fallbackChain = array_reverse( $fallbackChain );
		foreach ( $fallbackChain as $code ) {
			if ( isset( $newWords[$code] ) ) {
				$this->mMagicExtensions = $newWords[$code] + $this->mMagicExtensions;
			}
		}
	}
function addMagicWordsByLang ( $ newWords ) { $ code = $ this -> getCode ( ) ; $ fallbackChain = array ( ) ; while ( $ code && ! in_array ( $ code , $ fallbackChain ) ) { $ fallbackChain [ ] = $ code ; $ code = self :: getFallbackFor ( $ code ) ; } if ( ! in_array ( 'en' , $ fallbackChain ) ) { $ fallbackChain [ ] = 'en' ; } $ fallbackChain = array_reverse ( $ fallbackChain ) ; foreach ( $ fallbackChain as $ code ) { if ( isset ( $ newWords [ $ code ] ) ) { $ this -> mMagicExtensions = $ newWords [ $ code ] + $ this -> mMagicExtensions ; } } }
Add magic words to the extension array

@param $newWords array
Add magic words to the extension array