Move Arabic quickbar default to right side
[lhc/web/wiklou.git] / languages / LanguageAr.php
1 <?
2 # See language.doc
3 include_once("Utf8Case.php");
4
5 class LanguageAr extends LanguageUtf8 {
6 # TODO: TRANSLATION!
7
8 # Inherit everything except...
9
10 function isRTL() { return true; }
11
12 function getDefaultUserOptions () {
13 global $wgDefaultUserOptionsEn;
14 $opt = $wgDefaultUserOptionsEn;
15
16 # Swap sidebar to right side by default
17 $opt['quickbar'] = 2;
18 return $opt ;
19 }
20
21 function checkTitleEncoding( $s ) {
22 global $wgInputEncoding;
23
24 # Check for non-UTF-8 URLs; assume they are windows-1256?
25 $ishigh = preg_match( '/[\x80-\xff]/', $s);
26 $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
27 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
28
29 if( $ishigh and !$isutf )
30 return iconv( "windows-1256", "utf-8", $s );
31
32 return $s;
33 }
34
35 }
36
37 ?>