[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/languages/classes/ -> LanguageSr.php (summary)

Serbian (Српски / Srpski) specific code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 221 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 languages/LanguageConverter.php

Defines 2 classes

SrConverter:: (5 methods):
  loadDefaultTables()
  parseManualRule()
  findVariantLink()
  translate()
  guessVariant()

LanguageSr:: (1 method):
  __construct()


Class: SrConverter  - X-Ref

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.

loadDefaultTables()   X-Ref
No description

parseManualRule( $rule, $flags = array()   X-Ref
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

param: string $rule
param: array $flags
return: array

findVariantLink( &$link, &$nt, $ignoreOtherCond = false )   X-Ref
A function wrapper:
- if there is no selected variant, leave the link
names as they were
- do not try to find variants for usernames

param: string &$link
param: Title &$nt
param: bool $ignoreOtherCond

translate( $text, $toVariant )   X-Ref
It translates text into variant, specials:
- ommiting roman numbers

param: string $text
param: string $toVariant
return: string

guessVariant( $text, $variant )   X-Ref
Guess if a text is written in Cyrillic or Latin.
Overrides LanguageConverter::guessVariant()

author: Nikola Smolenski <[email protected]>
param: string $text The text to be checked
param: string $variant Language code of the variant to be checked for
return: bool True if $text appears to be written in $variant

Class: LanguageSr  - X-Ref

Serbian (Српски / Srpski)

__construct()   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1