Къошулуучу:Ernác/krc-script/LanguageKrc php
/*
*/
<?php
require_once( dirname(__FILE__).'/../LanguageConverter.php' );
/**
* @ingroup Language
*/
class KrcConverter extends LanguageConverter {
private $KrcCyrillicToLatin = array(
'А' => 'A', 'а' => 'a',
'Б' => 'B', 'б' => 'b',
'В' => 'V', 'в' => 'v',
'Г' => 'G', 'г' => 'g',
'Гъ' => 'Ğ', 'гъ' => 'ğ',
'Д' => 'D', 'д' => 'd',
'Дж' => 'C', 'дж' => 'c',
'Е' => 'E', 'е' => 'e',
'Ё' => 'Ö', 'ё' => 'ö',
'Ж' => 'J', 'ж' => 'j',
'З' => 'Z', 'з' => 'z',
'И' => 'İ', 'и' => 'i',
'Й' => 'Y', 'й' => 'y',
'К' => 'K', 'к' => 'k',
'Къ' => 'Q', 'къ' => 'q',
'Л' => 'L', 'л' => 'l',
'М' => 'M', 'м' => 'm',
'Н' => 'N', 'н' => 'n',
'Нг' => 'Ñ', 'нг' => 'ñ',
'О' => 'O', 'о' => 'o',
'П' => 'P', 'п' => 'p',
'Р' => 'R', 'р' => 'r',
'С' => 'S', 'с' => 's',
'Т' => 'T', 'т' => 't',
'У' => 'U', 'у' => 'u',
'Ў' => 'W', 'ў' => 'w',
'Ф' => 'F', 'ф' => 'f',
'Х' => 'H', 'х' => 'h',
'Ц' => 'Ts', 'ц' => 'ts',
'Ч' => 'Ç', 'ч' => 'ç',
'Ш' => 'Ş', 'ш' => 'ş',
'Щ' => 'Şç', 'щ' => 'şç',
'Ъ' => '', 'ъ' => '',
'Ы' => 'I', 'ы' => 'ı',
'Ь' => '', 'ь' => '',
'Э' => 'E', 'э' => 'e',
'Ю' => 'Ü', 'ю' => 'ü',
'Я' => 'Ya', 'я' => 'ya',
);
private $KrcLatinToCyrillic = array(
'A'=> 'А', 'a'=> 'а',
'Â' => 'Я','â' => 'я',
'B'=> 'Б', 'b'=> 'б',
'V'=> 'В', 'v'=> 'в',
'G'=> 'Г', 'g'=> 'г',
'Ğ'=> 'Гъ', 'ğ'=> 'гъ',
'D'=> 'Д', 'd'=> 'д',
'C'=> 'Дж', 'c'=> 'дж',
'J'=> 'Ж', 'j'=> 'ж',
'Z'=> 'З', 'z'=> 'з',
'İ'=> 'И', 'i'=> 'и',
'Y'=> 'Й', 'y'=> 'й',
'K'=> 'К', 'k'=> 'к',
'L'=> 'Л', 'l'=> 'л',
'M'=> 'М', 'm'=> 'м',
'N'=> 'Н', 'n'=> 'н',
'P'=> 'П', 'p'=> 'п',
'R'=> 'Р', 'r'=> 'р',
'S'=> 'С', 's'=> 'с',
'T'=> 'Т', 't'=> 'т',
'F'=> 'Ф', 'f'=> 'ф',
'H'=> 'Х', 'h'=> 'х',
'Ç'=> 'Ч', 'ç'=> 'ч',
'Ş'=> 'Ш', 'ş'=> 'ш',
'I'=> 'Ы', 'ı'=> 'ы',
'E'=> 'Э', 'e'=> 'э',
'U'=> 'У', 'u'=> 'у',
'W'=> 'У', 'w'=> 'у',
'Ü'=> 'Ю', 'ü'=> 'ю',
'Ö'=> 'Ё', 'ö'=> 'ё',
'Q'=> 'Къ', 'q'=> 'къ',
'Ñ'=> 'Нг', 'ñ'=> 'нг',
);
function loadDefaultTables() {
$this->mTables = array(
'krc-latn' => new ReplacementArray( $this->KrcCyrillicToLatin ),
'krc-cyrl' => new ReplacementArray( $this->KrcLatinToCyrillic ),
'krc' => new ReplacementArray()
);
}
}
/**
* @ingroup Language
*/
class LanguageKrc extends Language {
function __construct() {
parent::__construct();
$variants = array( 'krc', 'krc-latn', 'krc-cyrl');
$variantfallbacks = array(
'krc' => 'krc-latn',
'krc-latn' => 'krc',
'krc-cyrl' => 'krc',
);
$this->mConverter = new KrcConverter( $this, 'krc', $variants, $variantfallbacks );
}
}
/*
*/