Index: trunk/phase3/languages/LanguageAr.php |
— | — | @@ -2,11 +2,50 @@ |
3 | 3 | # See language.doc |
4 | 4 | include_once("LanguageUtf8.php"); |
5 | 5 | |
| 6 | +$wgNamespaceNamesAr = array( |
| 7 | + "-2" => "ملف", |
| 8 | + "-1" => "خاص", |
| 9 | + "0" => "", |
| 10 | + "1" => "نقاش", |
| 11 | + "2" => "مستخدم", |
| 12 | + "3" => "نقاش_المستخدم", |
| 13 | + "4" => "ويكيبيديا", |
| 14 | + "5" => "ويكيبيديا_نقاش", |
| 15 | + "6" => "صورة", |
| 16 | + "7" => "نقاش_الصورة", |
| 17 | + "8" => "MediaWiki", |
| 18 | + "9" => "MediaWiki_talk", |
| 19 | +); |
| 20 | + |
6 | 21 | class LanguageAr extends LanguageUtf8 { |
7 | 22 | # TODO: TRANSLATION! |
8 | 23 | |
9 | 24 | # Inherit everything except... |
10 | 25 | |
| 26 | + function getNamespaces() |
| 27 | + { |
| 28 | + global $wgNamespaceNamesAr; |
| 29 | + return $wgNamespaceNamesAr; |
| 30 | + } |
| 31 | + |
| 32 | + |
| 33 | + function getNsText( $index ) |
| 34 | + { |
| 35 | + global $wgNamespaceNamesAr; |
| 36 | + return $wgNamespaceNamesAr[$index]; |
| 37 | + } |
| 38 | + |
| 39 | + function getNsIndex( $text ) |
| 40 | + { |
| 41 | + global $wgNamespaceNamesAr; |
| 42 | + |
| 43 | + foreach ( $wgNamespaceNamesAr as $i => $n ) |
| 44 | + { |
| 45 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 46 | + } |
| 47 | + return LanguageUtf8::getNsIndex( $text ); |
| 48 | + } |
| 49 | + |
11 | 50 | function isRTL() { return true; } |
12 | 51 | |
13 | 52 | function getDefaultUserOptions () { |