summaryrefslogtreecommitdiff
path: root/languages/LanguageUr.php
blob: 1b994bea6b23b5b8cde547b3f88e2e00df761ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/** Urdu (اردو)
 *
 * @package MediaWiki
 * @subpackage Language
 */

require_once( "LanguageUtf8.php" );

class LanguageUr extends LanguageUtf8 {
	private $mMessagesUr = null;

	function __construct() {
		parent::__construct();

		global $wgAllMessagesUr;
		$this->mMessagesUr =& $wgAllMessagesUr;
	}

	function getMessage( $key ) {
		if( isset( $this->mMessagesUr[$key] ) ) {
			return $this->mMessagesUr[$key];
		} else {
			return parent::getMessage( $key );
		}
	}

	function getAllMessages() {
		return $this->mMessagesUr;
	}

	function getDefaultUserOptions() {
		$opt = parent::getDefaultUserOptions();
		$opt["quickbar"] = 2; # Right-to-left
		$opt["underline"] = 0; # Underline is hard to read in Arabic script
		return $opt;
	}

	# For right-to-left language support
	function isRTL() {
		return true;
	}
}

?>