Update memcached client to 1.0.10
[mediawiki.git] / languages / LanguageAr.php
blob59ffc48c839735c177888e5b2de18c2e6d93ab02
1 <?
2 # See language.doc
3 include_once("Utf8Case.php");
5 class LanguageAr extends LanguageUtf8 {
6 # TODO: TRANSLATION!
8 # Inherit everything except...
10 function isRTL() { return true; }
12 function getDefaultUserOptions () {
13 global $wgDefaultUserOptionsEn;
14 $opt = $wgDefaultUserOptionsEn;
16 # Swap sidebar to right side by default
17 $opt['quickbar'] = 2;
18 return $opt ;
21 function checkTitleEncoding( $s ) {
22 global $wgInputEncoding;
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 );
29 if( $ishigh and !$isutf )
30 return iconv( "windows-1256", "utf-8", $s );
32 return $s;