Go to the documentation of this file.
24 require_once __DIR__ .
'/../LanguageConverter.php';
37 'а' =>
'a',
'б' =>
'b',
'в' =>
'v',
'г' =>
'g',
'д' =>
'd',
38 'ђ' =>
'đ',
'е' =>
'e',
'ж' =>
'ž',
'з' =>
'z',
'и' =>
'i',
39 'ј' =>
'j',
'к' =>
'k',
'л' =>
'l',
'љ' =>
'lj',
'м' =>
'm',
40 'н' =>
'n',
'њ' =>
'nj',
'о' =>
'o',
'п' =>
'p',
'р' =>
'r',
41 'с' =>
's',
'т' =>
't',
'ћ' =>
'ć',
'у' =>
'u',
'ф' =>
'f',
42 'х' =>
'h',
'ц' =>
'c',
'ч' =>
'č',
'џ' =>
'dž',
'ш' =>
'š',
44 'А' =>
'A',
'Б' =>
'B',
'В' =>
'V',
'Г' =>
'G',
'Д' =>
'D',
45 'Ђ' =>
'Đ',
'Е' =>
'E',
'Ж' =>
'Ž',
'З' =>
'Z',
'И' =>
'I',
46 'Ј' =>
'J',
'К' =>
'K',
'Л' =>
'L',
'Љ' =>
'Lj',
'М' =>
'M',
47 'Н' =>
'N',
'Њ' =>
'Nj',
'О' =>
'O',
'П' =>
'P',
'Р' =>
'R',
48 'С' =>
'S',
'Т' =>
'T',
'Ћ' =>
'Ć',
'У' =>
'U',
'Ф' =>
'F',
49 'Х' =>
'H',
'Ц' =>
'C',
'Ч' =>
'Č',
'Џ' =>
'Dž',
'Ш' =>
'Š',
53 'a' =>
'а',
'b' =>
'б',
'c' =>
'ц',
'č' =>
'ч',
'ć' =>
'ћ',
54 'd' =>
'д',
'dž' =>
'џ',
'đ' =>
'ђ',
'e' =>
'е',
'f' =>
'ф',
55 'g' =>
'г',
'h' =>
'х',
'i' =>
'и',
'j' =>
'ј',
'k' =>
'к',
56 'l' =>
'л',
'lj' =>
'љ',
'm' =>
'м',
'n' =>
'н',
'nj' =>
'њ',
57 'o' =>
'о',
'p' =>
'п',
'r' =>
'р',
's' =>
'с',
'š' =>
'ш',
58 't' =>
'т',
'u' =>
'у',
'v' =>
'в',
'z' =>
'з',
'ž' =>
'ж',
60 'A' =>
'А',
'B' =>
'Б',
'C' =>
'Ц',
'Č' =>
'Ч',
'Ć' =>
'Ћ',
61 'D' =>
'Д',
'Dž' =>
'Џ',
'Đ' =>
'Ђ',
'E' =>
'Е',
'F' =>
'Ф',
62 'G' =>
'Г',
'H' =>
'Х',
'I' =>
'И',
'J' =>
'Ј',
'K' =>
'К',
63 'L' =>
'Л',
'LJ' =>
'Љ',
'M' =>
'М',
'N' =>
'Н',
'NJ' =>
'Њ',
64 'O' =>
'О',
'P' =>
'П',
'R' =>
'Р',
'S' =>
'С',
'Š' =>
'Ш',
65 'T' =>
'Т',
'U' =>
'У',
'V' =>
'В',
'Z' =>
'З',
'Ž' =>
'Ж',
67 'DŽ' =>
'Џ',
'd!ž' =>
'дж',
'D!ž' =>
'Дж',
'D!Ž' =>
'ДЖ',
68 'Lj' =>
'Љ',
'l!j' =>
'лј',
'L!j' =>
'Лј',
'L!J' =>
'ЛЈ',
69 'Nj' =>
'Њ',
'n!j' =>
'нј',
'N!j' =>
'Нј',
'N!J' =>
'НЈ'
73 $this->mTables =
array(
92 if ( in_array(
'T',
$flags ) ) {
93 return parent::parseManualRule( $rule,
$flags );
98 foreach ( $this->mVariants
as $v ) {
117 if ( is_object( $nt ) ) {
118 $ns = $nt->getNamespace();
125 parent::findVariantLink(
$link, $nt, $ignoreOtherCond );
126 if ( $this->getPreferredVariant() == $this->mMainLanguageCode ) {
144 if ( preg_match(
"/^$imagename:/", $text ) ) {
148 return parent::autoConvert( $text, $toVariant );
162 $breaks =
'[^\w\x80-\xff]';
165 $roman =
'M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})';
167 $reg =
'/^' . $roman .
'$|^' . $roman . $breaks .
'|' . $breaks
168 . $roman .
'$|' . $breaks . $roman . $breaks .
'/';
170 $matches = preg_split( $reg, $text, -1, PREG_SPLIT_OFFSET_CAPTURE );
174 if ( !isset( $this->mTables[$toVariant] ) ) {
176 . implode(
',', array_keys( $this->mTables ) ) );
178 $ret = $this->mTables[$toVariant]->replace( $m[0] );
179 $mstart = $m[1] + strlen( $m[0] );
181 $ret .= substr( $text, $mstart, $m[1] -$mstart );
183 $mstart = $m[1] + strlen( $m[0] );
201 $numCyrillic = preg_match_all(
"/[шђчћжШЂЧЋЖ]/u", $text, $dummy );
202 $numLatin = preg_match_all(
"/[šđč枊ĐČĆŽ]/u", $text, $dummy );
204 if ( $variant ==
'sr-ec' ) {
205 return $numCyrillic > $numLatin;
206 } elseif ( $variant ==
'sr-el' ) {
207 return $numLatin > $numCyrillic;
225 parent::__construct();
227 $variants =
array(
'sr',
'sr-ec',
'sr-el' );
228 $variantfallbacks =
array(
235 'S' =>
'S',
'писмо' =>
'S',
'pismo' =>
'S',
236 'W' =>
'W',
'реч' =>
'W',
'reč' =>
'W',
'ријеч' =>
'W',
'riječ' =>
'W'
238 $this->mConverter =
new SrConverter( $this,
'sr', $variants, $variantfallbacks,
$flags );
guessVariant( $text, $variant)
Guess if a text is written in Cyrillic or Latin.
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
A function wrapper:
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
There are two levels of conversion for Serbian: the script level (Cyrillics <-> Latin),...
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
LanguageConverter $mConverter
parseManualRule( $rule, $flags=array())
rules should be defined as -{ekavian | iyekavian-} -or- -{code:text | code:text | ....
$wgHooks['ArticleShow'][]
it s the revision text itself In either if gzip is the revision text is gzipped $flags
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
Serbian (Српски / Srpski)
Replacement array for FSS with fallback to strtr() Supports lazy initialisation of FSS resource.
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
def translate(text, conv_table)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
translate( $text, $toVariant)
It translates text into variant, specials:
autoConvert( $text, $toVariant=false)
An ugly function wrapper for parsing Image titles (to prevent image name conversion)
Internationalisation code.
if(! $wgRequest->checkUrlExtension()) if(! $wgEnableAPI) $wgTitle