* @ingroup Language
*/
-require_once( __DIR__ . '/../LanguageConverter.php' );
-require_once( __DIR__ . '/LanguageZh.php' );
-
/**
* @ingroup Language
*/
class GanConverter extends LanguageConverter {
-
/**
- * @param $langobj Language
- * @param $maincode string
- * @param $variants array
- * @param $variantfallbacks array
- * @param $flags array
- * @param $manualLevel array
+ * @param Language $langobj
+ * @param string $maincode
+ * @param array $variants
+ * @param array $variantfallbacks
+ * @param array $flags
+ * @param array $manualLevel
*/
function __construct( $langobj, $maincode,
- $variants = array(),
- $variantfallbacks = array(),
- $flags = array(),
- $manualLevel = array() ) {
+ $variants = array(),
+ $variantfallbacks = array(),
+ $flags = array(),
+ $manualLevel = array() ) {
$this->mDescCodeSep = ':';
$this->mDescVarSep = ';';
parent::__construct( $langobj, $maincode,
- $variants,
- $variantfallbacks,
- $flags,
- $manualLevel );
+ $variants,
+ $variantfallbacks,
+ $flags,
+ $manualLevel );
$names = array(
'gan' => '原文',
'gan-hans' => '简体',
}
function loadDefaultTables() {
- require( __DIR__ . "/../../includes/ZhConversion.php" );
+ require __DIR__ . '/../../includes/ZhConversion.php';
$this->mTables = array(
'gan-hans' => new ReplacementArray( $zh2Hans ),
'gan-hant' => new ReplacementArray( $zh2Hant ),
}
/**
- * @param $key string
- * @return String
+ * @param string $key
+ * @return string
*/
function convertCategoryKey( $key ) {
return $this->autoConvert( $key, 'gan' );
* @ingroup Language
*/
class LanguageGan extends LanguageZh {
-
function __construct() {
global $wgHooks;
parent::__construct();
);
$this->mConverter = new GanConverter( $this, 'gan',
- $variants, $variantfallbacks,
- array(),
- $ml );
+ $variants, $variantfallbacks,
+ array(),
+ $ml );
$wgHooks['PageContentSaveComplete'][] = $this->mConverter;
}
/**
* word segmentation
*
- * @param $string string
- * @param $autoVariant string
- * @return String
+ * @param string $string
+ * @param string $autoVariant
+ * @return string
*/
function normalizeForSearch( $string, $autoVariant = 'gan-hans' ) {
// LanguageZh::normalizeForSearch