Purging of scaled images when thumbnail is regenerated. Depends on visiting the page...
[mediawiki.git] / languages / LanguageAr.php
blob6eae649b62a2341decb13e0a9d7307ff6b1e3316
1 <?php
2 # See language.doc
3 include_once("LanguageUtf8.php");
5 /* private */ $wgNamespaceNamesAr = array(
6 "-2" => "ملف",
7 "-1" => "خاص",
8 "0" => "",
9 "1" => "نقاش",
10 "2" => "مستخدم",
11 "3" => "نقاش_المستخدم",
12 "4" => "ويكيبيديا",
13 "5" => "ويكيبيديا_نقاش",
14 "6" => "صورة",
15 "7" => "نقاش_الصورة",
16 "8" => "MediaWiki",
17 "9" => "MediaWiki_talk",
20 /* private */ $wgWeekdayNamesAr = array(
21 "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس",
22 "الجمعة", "السبت"
25 /* private */ $wgMonthNamesAr = array(
26 "يناير", "فبراير", "مارس", "ابريل", "مايو", "يونيو",
27 "يوليو", "أغسطس", "سبتمبر", "اكتوبر", "نوفمبر",
28 "ديسمبر"
31 class LanguageAr extends LanguageUtf8 {
32 # TODO: TRANSLATION!
34 # Inherit everything except...
36 function getNamespaces()
38 global $wgNamespaceNamesAr;
39 return $wgNamespaceNamesAr;
43 function getNsText( $index )
45 global $wgNamespaceNamesAr;
46 return $wgNamespaceNamesAr[$index];
49 function getNsIndex( $text )
51 global $wgNamespaceNamesAr;
53 foreach ( $wgNamespaceNamesAr as $i => $n )
55 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
57 return LanguageUtf8::getNsIndex( $text );
60 function getMonthName( $key )
62 global $wgMonthNamesAr;
63 return $wgMonthNamesAr[$key-1];
66 function getMonthAbbreviation( $key )
68 /* No abbreviations in Arabic */
69 return $this->getMonthName( $key );
72 function getWeekdayName( $key )
74 global $wgWeekdayNamesAr;
75 return $wgWeekdayNamesAr[$key-1];
78 function isRTL() { return true; }
80 function linkPrefixExtension() { return true; }
82 function getDefaultUserOptions () {
83 global $wgDefaultUserOptionsEn;
84 $opt = $wgDefaultUserOptionsEn;
86 # Swap sidebar to right side by default
87 $opt['quickbar'] = 2;
88 return $opt ;
91 function checkTitleEncoding( $s ) {
92 global $wgInputEncoding;
94 # Check for non-UTF-8 URLs; assume they are windows-1256?
95 $ishigh = preg_match( '/[\x80-\xff]/', $s);
96 $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
97 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
99 if( $ishigh and !$isutf )
100 return iconv( "windows-1256", "utf-8", $s );
102 return $s;