Inherits LanguageConverter.
Public Member Functions | |
| loadDefaultTables () | |
| Load default conversion tables This method must be implemented in derived class. | |
| parseManualRule ($rule, $flags=array()) | |
| parserConvert ($text, &$parser) | |
| Convert text using a parser object for context. | |
| findVariantLink (&$link, &$nt, $ignoreOtherCond=false) | |
| if a language supports multiple variants, it is possible that non-existing link in one variant actually exists in another variant. | |
| markNoConversion ($text, $noParse=false) | |
| Enclose a string with the "no conversion" tag. | |
| autoConvert ($text, $toVariant=false) | |
| dictionary-based conversion | |
| translate ($text, $toVariant) | |
It translates text into variant, specials:
| |
Public Attributes | |
| $mToLatin | |
| $mToCyrillics | |
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 | |||
| ) |
dictionary-based conversion
| string | $text the text to be converted | |
| string | $toVariant the target language code |
Reimplemented from LanguageConverter.
Definition at line 123 of file LanguageSr.php.
| SrConverter::findVariantLink | ( | &$ | link, | |
| &$ | nt, | |||
| $ | ignoreOtherCond = false | |||
| ) |
if a language supports multiple variants, it is possible that non-existing link in one variant actually exists in another variant.
this function tries to find it. See e.g. LanguageZh.php
| string | $link the name of the link | |
| mixed | $nt the title object of the link | |
| boolean | $ignoreOtherCond: to disable other conditions when we need to transclude a template or update a category's link |
Reimplemented from LanguageConverter.
Definition at line 95 of file LanguageSr.php.
References $ns, and LanguageConverter::getPreferredVariant().
| SrConverter::loadDefaultTables | ( | ) |
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 | |||
| ) |
Enclose a string with the "no conversion" tag.
This is used by various functions in the Parser
| string | $text text to be tagged for no conversion |
Reimplemented from LanguageConverter.
Definition at line 113 of file LanguageSr.php.
References $text.
| SrConverter::parseManualRule | ( | $ | rule, | |
| $ | flags = array() | |||
| ) |
| SrConverter::parserConvert | ( | $ | text, | |
| &$ | parser | |||
| ) |
Convert text using a parser object for context.
Reimplemented from LanguageConverter.
Definition at line 80 of file LanguageSr.php.
References $text.
| SrConverter::translate | ( | $ | text, | |
| $ | toVariant | |||
| ) |
It translates text into variant, specials:
Reimplemented from LanguageConverter.
Definition at line 136 of file LanguageSr.php.
References $text.
| SrConverter::$mToCyrillics |
Initial value:
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 |
Initial value:
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.
1.5.9