(bug 2871) Links to talk pages in watchlist editing view
[lhc/web/wiklou.git] / languages / LanguageYi.php
1 <?php
2 /** Yiddish (ייִדיש)
3 *
4 * @bug 3810
5 *
6 * @package MediaWiki
7 * @subpackage Language
8 */
9
10 require_once 'LanguageUtf8.php';
11
12 $wgNamespaceNamesYi = array(
13 NS_MEDIA => 'מעדיע',
14 NS_SPECIAL => 'באַזונדער',
15 NS_MAIN => '',
16 NS_TALK => 'רעדן',
17 NS_USER => 'באַניצער',
18 NS_USER_TALK => 'באַניצער_רעדן',
19 NS_PROJECT => $wgMetaNamespace,
20 NS_PROJECT_TALK => $wgMetaNamespace . '_רעדן',
21 NS_IMAGE => 'בילד',
22 NS_IMAGE_TALK => 'בילד_רעדן',
23 NS_MEDIAWIKI => 'מעדיעװיקי',
24 NS_MEDIAWIKI_TALK => 'מעדיעװיקי_רעדן',
25 NS_TEMPLATE => 'מוסטער',
26 NS_TEMPLATE_TALK => 'מוסטער_רעדן',
27 NS_HELP => 'הילף',
28 NS_HELP_TALK => 'הילף_רעדן',
29 NS_CATEGORY => 'קאַטעגאָריע',
30 NS_CATEGORY_TALK=> 'קאַטעגאָריע_רעדן'
31 );
32
33 class LanguageYi extends LanguageUtf8 {
34 function getNamespaces() {
35 global $wgNamespaceNamesYi;
36 return $wgNamespaceNamesYi;
37 }
38
39 function getDefaultUserOptions() {
40 $opt = parent::getDefaultUserOptions();
41 $opt['quickbar'] = 2; # Right-to-left
42 return $opt;
43 }
44
45 # For right-to-left language support
46 function isRTL() {
47 return true;
48 }
49
50 function getNsIndex( $text ) {
51 global $wgNamespaceNamesYi, $wgSitename;
52
53 foreach ( $wgNamespaceNamesYi as $i => $n ) {
54 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
55 }
56 if( $wgSitename == 'װיקיפּעדיע' ) {
57 if( 0 == strcasecmp( 'וויקיפעדיע', $text ) ) return NS_PROJECT;
58 if( 0 == strcasecmp( 'וויקיפעדיע_רעדן', $text ) ) return NS_PROJECT_TALK;
59 }
60 if( $wgSitename == 'װיקיביבליאָטעק' ) {
61 if( 0 == strcasecmp( 'וויקיביבליאטעק', $text ) ) return NS_PROJECT;
62 if( 0 == strcasecmp( 'וויקיביבליאטעק_רעדן', $text ) ) return NS_PROJECT_TALK;
63 }
64 if( $wgSitename == 'װיקיװערטערבוך' ) {
65 if( 0 == strcasecmp( 'וויקיווערטערבוך', $text ) ) return NS_PROJECT;
66 if( 0 == strcasecmp( 'וויקיווערטערבוך_רעדן', $text ) ) return NS_PROJECT_TALK;
67 }
68 if( $wgSitename == 'װיקינײַעס' ) {
69 if( 0 == strcasecmp( 'וויקינייעס', $text ) ) return NS_PROJECT;
70 if( 0 == strcasecmp( 'וויקינייעס_רעדן', $text ) ) return NS_PROJECT_TALK;
71 }
72 if( 0 == strcasecmp( 'באזונדער', $text ) ) return NS_SPECIAL;
73 if( 0 == strcasecmp( 'באנוצער', $text ) ) return NS_USER;
74 if( 0 == strcasecmp( 'באנוצער_רעדן', $text ) ) return NS_USER_TALK;
75 if( 0 == strcasecmp( 'מעדיעוויקי', $text ) ) return NS_MEDIAWIKI;
76 if( 0 == strcasecmp( 'מעדיעוויקי_רעדן', $text ) ) return NS_MEDIAWIKI_TALK;
77 if( 0 == strcasecmp( 'קאטעגאריע', $text ) ) return NS_CATEGORY;
78 if( 0 == strcasecmp( 'קאטעגאריע_רעדן', $text ) ) return NS_CATEGORY_TALK;
79 return false;
80 }
81 }
82
83 ?>