MediaWiki  1.32.5
CrhConverter Class Reference

Crimean Tatar (Qırımtatarca) converter routines. More...

Inheritance diagram for CrhConverter:
Collaboration diagram for CrhConverter:

Public Member Functions

 __construct (Language $langobj, $maincode, $variants=[], $variantfallbacks=[], $flags=[])
 
 findVariantLink (&$link, &$nt, $ignoreOtherCond=false)
 A function wrapper: More...
 
 loadDefaultTables ()
 
 loadExceptions ()
 
 translate ( $text, $toVariant)
 It translates text into variant, specials: More...
 

Public Attributes

 $mCyrillicToLatin
 
 $mCyrl2LatnExceptions = []
 
 $mCyrl2LatnPatterns = []
 
 $mCyrlCleanUpRegexes = []
 
 $mExceptionsLoaded = false
 
 $mLatinToCyrillic
 
 $mLatn2CyrlExceptions = []
 
 $mLatn2CyrlPatterns = []
 
const C_CONS = 'бвгджзйклмнпрстфхцчшщcñБВГДЖЗЙКЛМНПРСТФХЦЧШЩCÑ'
 
const C_CONS_LC = 'бвгджзйклмнпрстфхцчшщcñ'
 
const C_CONS_UC = 'БВГДЖЗЙКЛМНПРСТФХЦЧШЩCÑ'
 
const C_LC = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'
 
const C_M_CONS = 'бгкмшcБГКМШC'
 
const C_UC = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'
 
const L_CONS = 'bcçdfgğhjklmnñpqrsştvzBCÇDFGĞHJKLMNÑPQRSŞTVZ'
 
const L_CONS_LC = 'bcçdfgğhjklmnñpqrsştvz'
 
const L_CONS_UC = 'BCÇDFGĞHJKLMNÑPQRSŞTVZ'
 
const L_F = 'eiöüEİÖÜ'
 
const L_F_UC = 'EİÖÜ'
 
const L_LC = 'aâbcçdefgğhıijklmnñoöpqrsştuüvyz'
 
const L_M_CONS = 'bcgkmpşBCGKMPŞ'
 
const L_N_CONS = 'çnrstzÇNRSTZ'
 
const L_N_CONS_LC = 'çnrstz'
 
const L_N_CONS_UC = 'ÇNRSTZ'
 
const L_UC = 'AÂBCÇDEFGĞHIİJKLMNÑOÖPQRSŞTUÜVYZ'
 
const L_VOW = 'aâeıioöuüAÂEIİOÖUÜ'
 
const L_VOW_UC = 'AÂEIİOÖUÜ'
 

Private Member Functions

 regsConverter ( $text, $toVariant)
 

Detailed Description

Crimean Tatar (Qırımtatarca) converter routines.

Definition at line 31 of file LanguageCrh.php.

Constructor & Destructor Documentation

◆ __construct()

CrhConverter::__construct ( Language  $langobj,
  $maincode,
  $variants = [],
  $variantfallbacks = [],
  $flags = [] 
)
Parameters
Language$langobj
string$maincode
array$variants
array$variantfallbacks
array$flags

Definition at line 66 of file LanguageCrh.php.

References loadExceptions().

Member Function Documentation

◆ findVariantLink()

CrhConverter::findVariantLink ( $link,
$nt,
  $ignoreOtherCond = false 
)

A function wrapper:

  • if there is no selected variant, leave the link names as they were
  • do not try to find variants for usernames
Parameters
string&$link
Title&$nt
bool$ignoreOtherCond

Definition at line 174 of file LanguageCrh.php.

References $link, NS_USER, and NS_USER_TALK.

◆ loadDefaultTables()

CrhConverter::loadDefaultTables ( )

Definition at line 144 of file LanguageCrh.php.

◆ loadExceptions()

CrhConverter::loadExceptions ( )

Definition at line 152 of file LanguageCrh.php.

References list.

Referenced by __construct().

◆ regsConverter()

CrhConverter::regsConverter (   $text,
  $toVariant 
)
private

Definition at line 254 of file LanguageCrh.php.

References as, and Makefile\translate().

Referenced by translate().

◆ translate()

CrhConverter::translate (   $text,
  $toVariant 
)

It translates text into variant, specials:

  • omitting roman numbers
Parameters
string$text
bool$toVariant
Exceptions
MWException
Returns
string

Definition at line 200 of file LanguageCrh.php.

References $matches, $ret, as, and regsConverter().

Member Data Documentation

◆ $mCyrillicToLatin

CrhConverter::$mCyrillicToLatin
Initial value:
= [
## these are independent of location in the word, but have
## to go first so other transforms don't bleed them
'гъ' => 'ğ', 'Гъ' => 'Ğ', 'ГЪ' => 'Ğ',
'къ' => 'q', 'Къ' => 'Q', 'КЪ' => 'Q',
'нъ' => 'ñ', 'Нъ' => 'Ñ', 'НЪ' => 'Ñ',
'дж' => 'c', 'Дж' => 'C', 'ДЖ' => 'C',
'А' => 'A', 'а' => 'a', 'Б' => 'B', 'б' => 'b',
'В' => 'V', 'в' => 'v', 'Г' => 'G', 'г' => 'g',
'Д' => 'D', 'д' => 'd', 'Ж' => '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', 'Е' => 'E', 'е' => 'e',
'Я' => 'Â', 'я' => 'â', 'У' => 'U', 'у' => 'u',
'О' => 'O', 'о' => 'o',
'Ё' => 'Yo', 'ё' => 'yo', 'Ю' => 'Yu', 'ю' => 'yu',
'Ц' => 'Ts', 'ц' => 'ts', 'Щ' => 'Şç', 'щ' => 'şç',
'Ь' => '', 'ь' => '', 'Ъ' => '', 'ъ' => '',
]

Definition at line 79 of file LanguageCrh.php.

◆ $mCyrl2LatnExceptions

CrhConverter::$mCyrl2LatnExceptions = []

Definition at line 134 of file LanguageCrh.php.

◆ $mCyrl2LatnPatterns

CrhConverter::$mCyrl2LatnPatterns = []

Definition at line 137 of file LanguageCrh.php.

◆ $mCyrlCleanUpRegexes

CrhConverter::$mCyrlCleanUpRegexes = []

Definition at line 140 of file LanguageCrh.php.

◆ $mExceptionsLoaded

CrhConverter::$mExceptionsLoaded = false

Definition at line 142 of file LanguageCrh.php.

◆ $mLatinToCyrillic

CrhConverter::$mLatinToCyrillic
Initial value:
= [
'Â' => 'Я', 'â' => 'я', 'B' => 'Б', 'b' => 'б',
'Ç' => 'Ч', 'ç' => 'ч', 'D' => 'Д', 'd' => 'д',
'F' => 'Ф', 'f' => 'ф', 'G' => 'Г', 'g' => 'г',
'H' => 'Х', 'h' => 'х', 'I' => 'Ы', 'ı' => 'ы',
'İ' => 'И', 'i' => 'и', 'J' => 'Ж', 'j' => 'ж',
'K' => 'К', 'k' => 'к', 'L' => 'Л', 'l' => 'л',
'M' => 'М', 'm' => 'м', 'N' => 'Н', 'n' => 'н',
'O' => 'О', 'o' => 'о', 'P' => 'П', 'p' => 'п',
'R' => 'Р', 'r' => 'р', 'S' => 'С', 's' => 'с',
'Ş' => 'Ш', 'ş' => 'ш', 'T' => 'Т', 't' => 'т',
'V' => 'В', 'v' => 'в', 'Z' => 'З', 'z' => 'з',
'ya' => 'я', 'Ya' => 'Я', 'YA' => 'Я',
'ye' => 'е', 'YE' => 'Е', 'Ye' => 'Е',
'A' => 'А', 'a' => 'а', 'E' => 'Е', 'e' => 'е',
'Ö' => 'Ё', 'ö' => 'ё', 'U' => 'У', 'u' => 'у',
'Ü' => 'Ю', 'ü' => 'ю', 'Y' => 'Й', 'y' => 'й',
'C' => 'Дж', 'c' => 'дж', 'Ğ' => 'Гъ', 'ğ' => 'гъ',
'Ñ' => 'Нъ', 'ñ' => 'нъ', 'Q' => 'Къ', 'q' => 'къ',
]

Definition at line 109 of file LanguageCrh.php.

◆ $mLatn2CyrlExceptions

CrhConverter::$mLatn2CyrlExceptions = []

Definition at line 135 of file LanguageCrh.php.

◆ $mLatn2CyrlPatterns

CrhConverter::$mLatn2CyrlPatterns = []

Definition at line 138 of file LanguageCrh.php.

◆ C_CONS

const CrhConverter::C_CONS = 'бвгджзйклмнпрстфхцчшщcñБВГДЖЗЙКЛМНПРСТФХЦЧШЩCÑ'

Definition at line 42 of file LanguageCrh.php.

◆ C_CONS_LC

const CrhConverter::C_CONS_LC = 'бвгджзйклмнпрстфхцчшщcñ'

Definition at line 38 of file LanguageCrh.php.

◆ C_CONS_UC

const CrhConverter::C_CONS_UC = 'БВГДЖЗЙКЛМНПРСТФХЦЧШЩCÑ'

Definition at line 37 of file LanguageCrh.php.

◆ C_LC

const CrhConverter::C_LC = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'

Definition at line 36 of file LanguageCrh.php.

◆ C_M_CONS

const CrhConverter::C_M_CONS = 'бгкмшcБГКМШC'

Definition at line 39 of file LanguageCrh.php.

◆ C_UC

const CrhConverter::C_UC = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'

Definition at line 35 of file LanguageCrh.php.

◆ L_CONS

const CrhConverter::L_CONS = 'bcçdfgğhjklmnñpqrsştvzBCÇDFGĞHJKLMNÑPQRSŞTVZ'

Definition at line 53 of file LanguageCrh.php.

◆ L_CONS_LC

const CrhConverter::L_CONS_LC = 'bcçdfgğhjklmnñpqrsştvz'

Definition at line 52 of file LanguageCrh.php.

◆ L_CONS_UC

const CrhConverter::L_CONS_UC = 'BCÇDFGĞHJKLMNÑPQRSŞTVZ'

Definition at line 51 of file LanguageCrh.php.

◆ L_F

const CrhConverter::L_F = 'eiöüEİÖÜ'

Definition at line 57 of file LanguageCrh.php.

◆ L_F_UC

const CrhConverter::L_F_UC = 'EİÖÜ'

Definition at line 56 of file LanguageCrh.php.

◆ L_LC

const CrhConverter::L_LC = 'aâbcçdefgğhıijklmnñoöpqrsştuüvyz'

Definition at line 46 of file LanguageCrh.php.

◆ L_M_CONS

const CrhConverter::L_M_CONS = 'bcgkmpşBCGKMPŞ'

Definition at line 50 of file LanguageCrh.php.

◆ L_N_CONS

const CrhConverter::L_N_CONS = 'çnrstzÇNRSTZ'

Definition at line 49 of file LanguageCrh.php.

◆ L_N_CONS_LC

const CrhConverter::L_N_CONS_LC = 'çnrstz'

Definition at line 48 of file LanguageCrh.php.

◆ L_N_CONS_UC

const CrhConverter::L_N_CONS_UC = 'ÇNRSTZ'

Definition at line 47 of file LanguageCrh.php.

◆ L_UC

const CrhConverter::L_UC = 'AÂBCÇDEFGĞHIİJKLMNÑOÖPQRSŞTUÜVYZ'

Definition at line 45 of file LanguageCrh.php.

◆ L_VOW

const CrhConverter::L_VOW = 'aâeıioöuüAÂEIİOÖUÜ'

Definition at line 55 of file LanguageCrh.php.

◆ L_VOW_UC

const CrhConverter::L_VOW_UC = 'AÂEIİOÖUÜ'

Definition at line 54 of file LanguageCrh.php.


The documentation for this class was generated from the following file: