SrConverter Class Reference
[Language]

There are two levels of conversion for Serbian: the script level (Cyrillics <-> Latin), and the variant level (ekavian <->iyekavian). More...

Inherits LanguageConverter.

List of all members.

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:
  • ommiting roman numbers.


Public Attributes

 $mToLatin
 $mToCyrillics


Detailed Description

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.


Member Function Documentation

SrConverter::autoConvert ( text,
toVariant = false 
)

dictionary-based conversion

Parameters:
string $text the text to be converted
string $toVariant the target language code
Returns:
string the converted text
Access:
private

Reimplemented from LanguageConverter.

Definition at line 123 of file LanguageSr.php.

References $text, and $wgTitle.

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

Parameters:
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
Returns:
null the input parameters may be modified upon return
Access:
public

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.

Access:
private

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

Parameters:
string $text text to be tagged for no conversion
Returns:
string the tagged text
Access:
public

Reimplemented from LanguageConverter.

Definition at line 113 of file LanguageSr.php.

References $text.

SrConverter::parseManualRule ( rule,
flags = array() 
)

Definition at line 66 of file LanguageSr.php.

References $flags.

SrConverter::parserConvert ( text,
&$  parser 
)

Convert text using a parser object for context.

Access:
public

Reimplemented from LanguageConverter.

Definition at line 80 of file LanguageSr.php.

References $text.

SrConverter::translate ( text,
toVariant 
)

It translates text into variant, specials:

  • ommiting roman numbers.

Reimplemented from LanguageConverter.

Definition at line 136 of file LanguageSr.php.

References $text.


Member Data Documentation

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.


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

Generated on Sat Sep 5 02:08:48 2009 for MediaWiki by  doxygen 1.5.9