10 require_once 'LanguageUtf8.php';
12 if (!$wgCachedMessageArrays) {
13 require_once('MessagesYi.php');
16 class LanguageYi
extends LanguageUtf8
{
17 private $mMessagesYi, $mNamespaceNamesYi = null;
19 function LanguageYi() {
20 LanguageUtf8
::LanguageUtf8();
22 global $wgAllMessagesYi;
23 $this->mMessagesYi
=& $wgAllMessagesYi;
25 global $wgMetaNamespace;
26 $this->mNamespaceNamesYi
= array(
28 NS_SPECIAL
=> 'באַזונדער',
31 NS_USER
=> 'באַניצער',
32 NS_USER_TALK
=> 'באַניצער_רעדן',
33 NS_PROJECT
=> $wgMetaNamespace,
34 NS_PROJECT_TALK
=> $wgMetaNamespace . '_רעדן',
36 NS_IMAGE_TALK
=> 'בילד_רעדן',
37 NS_MEDIAWIKI
=> 'מעדיעװיקי',
38 NS_MEDIAWIKI_TALK
=> 'מעדיעװיקי_רעדן',
39 NS_TEMPLATE
=> 'מוסטער',
40 NS_TEMPLATE_TALK
=> 'מוסטער_רעדן',
42 NS_HELP_TALK
=> 'הילף_רעדן',
43 NS_CATEGORY
=> 'קאַטעגאָריע',
44 NS_CATEGORY_TALK
=> 'קאַטעגאָריע_רעדן'
48 function getNamespaces() {
49 return $this->mNamespaceNamesYi + parent
::getNamespaces();
52 function getMessage( $key ) {
53 if( isset( $this->mMessagesYi
[$key] ) ) {
54 return $this->mMessagesYi
[$key];
56 return parent
::getMessage( $key );
60 function getAllMessages() {
61 return $this->mMessagesYi
;
64 function getDefaultUserOptions() {
65 $opt = parent
::getDefaultUserOptions();
66 $opt['quickbar'] = 2; # Right-to-left
70 # For right-to-left language support
75 function getNsIndex( $text ) {
78 foreach ( $this->mNamespaceNamesYi
as $i => $n ) {
79 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
81 if( $wgSitename == 'װיקיפּעדיע' ) {
82 if( 0 == strcasecmp( 'וויקיפעדיע', $text ) ) return NS_PROJECT
;
83 if( 0 == strcasecmp( 'וויקיפעדיע_רעדן', $text ) ) return NS_PROJECT_TALK
;
85 if( $wgSitename == 'װיקיביבליאָטעק' ) {
86 if( 0 == strcasecmp( 'וויקיביבליאטעק', $text ) ) return NS_PROJECT
;
87 if( 0 == strcasecmp( 'וויקיביבליאטעק_רעדן', $text ) ) return NS_PROJECT_TALK
;
89 if( $wgSitename == 'װיקיװערטערבוך' ) {
90 if( 0 == strcasecmp( 'וויקיווערטערבוך', $text ) ) return NS_PROJECT
;
91 if( 0 == strcasecmp( 'וויקיווערטערבוך_רעדן', $text ) ) return NS_PROJECT_TALK
;
93 if( $wgSitename == 'װיקינײַעס' ) {
94 if( 0 == strcasecmp( 'וויקינייעס', $text ) ) return NS_PROJECT
;
95 if( 0 == strcasecmp( 'וויקינייעס_רעדן', $text ) ) return NS_PROJECT_TALK
;
97 if( 0 == strcasecmp( 'באזונדער', $text ) ) return NS_SPECIAL
;
98 if( 0 == strcasecmp( 'באנוצער', $text ) ) return NS_USER
;
99 if( 0 == strcasecmp( 'באנוצער_רעדן', $text ) ) return NS_USER_TALK
;
100 if( 0 == strcasecmp( 'מעדיעוויקי', $text ) ) return NS_MEDIAWIKI
;
101 if( 0 == strcasecmp( 'מעדיעוויקי_רעדן', $text ) ) return NS_MEDIAWIKI_TALK
;
102 if( 0 == strcasecmp( 'קאטעגאריע', $text ) ) return NS_CATEGORY
;
103 if( 0 == strcasecmp( 'קאטעגאריע_רעדן', $text ) ) return NS_CATEGORY_TALK
;