MediaWiki
REL1_19
|
There are two levels of conversion for Serbian: the script level (Cyrillics <-> Latin), and the variant level (ekavian <->iyekavian). More...
Public Member Functions | |
autoConvert ($text, $toVariant=false) | |
An ugly function wrapper for parsing Image titles (to prevent image name conversion) | |
findVariantLink (&$link, &$nt, $ignoreOtherCond=false) | |
A function wrapper: | |
guessVariant ($text, $variant) | |
Guess if a text is written in Cyrillic or Latin. | |
loadDefaultTables () | |
Load default conversion tables. | |
markNoConversion ($text, $noParse=false) | |
We want our external link captions to be converted in variants, so we return the original text instead -{$text}-, except for URLs. | |
parseManualRule ($rule, $flags=array()) | |
rules should be defined as -{ekavian | iyekavian-} -or- | |
translate ($text, $toVariant) | |
It translates text into variant, specials: | |
Public Attributes | |
$mToCyrillics | |
$mToLatin |
There are two levels of conversion for Serbian: the script level (Cyrillics <-> Latin), and the variant level (ekavian <->iyekavian).
The two are orthogonal. So we really only need two dictionaries: one for Cyrillics and Latin, and one for ekavian and iyekavian.
Definition at line 16 of file LanguageSr.php.
SrConverter::autoConvert | ( | $ | text, |
$ | toVariant = false |
||
) |
An ugly function wrapper for parsing Image titles (to prevent image name conversion)
$text | string |
$toVariant | bool |
Reimplemented from LanguageConverter.
Definition at line 134 of file LanguageSr.php.
References $wgTitle.
SrConverter::findVariantLink | ( | &$ | link, |
&$ | nt, | ||
$ | ignoreOtherCond = false |
||
) |
A function wrapper:
$link | string |
$nt | Title |
$ignoreOtherCond | bool |
Reimplemented from LanguageConverter.
Definition at line 96 of file LanguageSr.php.
References LanguageConverter\getPreferredVariant().
SrConverter::guessVariant | ( | $ | text, |
$ | variant | ||
) |
Guess if a text is written in Cyrillic or Latin.
Overrides LanguageConverter::guessVariant()
string | $text | The text to be checked |
string | $variant | Language code of the variant to be checked for |
Reimplemented from LanguageConverter.
Definition at line 188 of file LanguageSr.php.
Load default conversion tables.
This method must be implemented in derived class.
Reimplemented from LanguageConverter.
Definition at line 53 of file LanguageSr.php.
SrConverter::markNoConversion | ( | $ | text, |
$ | noParse = false |
||
) |
We want our external link captions to be converted in variants, so we return the original text instead -{$text}-, except for URLs.
$text | string |
$noParse | bool |
Reimplemented from LanguageConverter.
Definition at line 119 of file LanguageSr.php.
SrConverter::parseManualRule | ( | $ | rule, |
$ | flags = array() |
||
) |
rules should be defined as -{ekavian | iyekavian-} -or-
-{code:text | code:text | ...}-
update: delete all rule parsing because it's not used currently, and just produces a couple of bugs
$rule | string |
$flags | array |
Definition at line 72 of file LanguageSr.php.
SrConverter::translate | ( | $ | text, |
$ | toVariant | ||
) |
It translates text into variant, specials:
$text | string |
$toVariant | string |
Reimplemented from LanguageConverter.
Definition at line 152 of file LanguageSr.php.
References $matches.
SrConverter::$mToCyrillics |
array( 'a' => 'а', 'b' => 'б', 'c' => 'ц', 'č' => 'ч', 'ć' => 'ћ', 'd' => 'д', 'dž' => 'џ', 'đ' => 'ђ', 'e' => 'е', 'f' => 'ф', 'g' => 'г', 'h' => 'х', 'i' => 'и', 'j' => 'ј', 'k' => 'к', 'l' => 'л', 'lj' => 'љ', 'm' => 'м', 'n' => 'н', 'nj' => 'њ', 'o' => 'о', 'p' => 'п', 'r' => 'р', 's' => 'с', 'š' => 'ш', 't' => 'т', 'u' => 'у', 'v' => 'в', 'z' => 'з', 'ž' => 'ж', 'A' => 'А', 'B' => 'Б', 'C' => 'Ц', 'Č' => 'Ч', 'Ć' => 'Ћ', 'D' => 'Д', 'Dž' => 'Џ', 'Đ' => 'Ђ', 'E' => 'Е', 'F' => 'Ф', 'G' => 'Г', 'H' => 'Х', 'I' => 'И', 'J' => 'Ј', 'K' => 'К', 'L' => 'Л', 'LJ' => 'Љ', 'M' => 'М', 'N' => 'Н', 'NJ' => 'Њ', 'O' => 'О', 'P' => 'П', 'R' => 'Р', 'S' => 'С', 'Š' => 'Ш', 'T' => 'Т', 'U' => 'У', 'V' => 'В', 'Z' => 'З', 'Ž' => 'Ж', 'DŽ' => 'Џ', 'd!ž' => 'дж', 'D!ž' => 'Дж', 'D!Ž' => 'ДЖ', 'Lj' => 'Љ', 'l!j' => 'лј', 'L!j' => 'Лј', 'L!J' => 'ЛЈ', 'Nj' => 'Њ', 'n!j' => 'нј', 'N!j' => 'Нј', 'N!J' => 'НЈ' )
Definition at line 33 of file LanguageSr.php.
SrConverter::$mToLatin |
array( 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'ђ' => 'đ', 'е' => 'e', 'ж' => 'ž', 'з' => 'z', 'и' => 'i', 'ј' => 'j', 'к' => 'k', 'л' => 'l', 'љ' => 'lj', 'м' => 'm', 'н' => 'n', 'њ' => 'nj', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'ћ' => 'ć', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'č', 'џ' => 'dž', 'ш' => 'š', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Ђ' => 'Đ', 'Е' => 'E', 'Ж' => 'Ž', 'З' => 'Z', 'И' => 'I', 'Ј' => 'J', 'К' => 'K', 'Л' => 'L', 'Љ' => 'Lj', 'М' => 'M', 'Н' => 'N', 'Њ' => 'Nj', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'Ћ' => 'Ć', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Č', 'Џ' => 'Dž', 'Ш' => 'Š', )
Definition at line 17 of file LanguageSr.php.