Extension:LanguageFunctions/v0.1.1/LanguageFunctions.i18n.magic.php

From MediaWiki.org
Jump to navigation Jump to search
<?php

/*
	LanguageFunctions.php
	Leovitch 27Jun2009
	The code is licensed under a Creative Commons Attribution 3.0 United States License
*/

function lfLanguageFunctionsWords( $lang ) {
	$words = array();

	/**
	 * English
	 */
	$words['en'] = array(
		'iflang'       => array( 0, 'iflang' ),
		'ifmultlang'       => array( 0, 'ifmultlang' ),
	);

	/**
	 * Japanese 日本語
	 */
	$words['ja'] = array(
		'iflang'       => array( 0, '言語', 'iflang' ),
		'ifmultlang'       => array( 0, '言語数', 'ifmultlang' ),
	);

	# English is used as a fallback, and the English synonyms are
	# used if a translation has not been provided for a given word
	return ( $lang == 'en' || !isset( $words[$lang] ) )
		? $words['en']
		: array_merge( $words['en'], $words[$lang] );
}
?>