From: Brion Vibber Date: Tue, 8 Jul 2003 20:17:36 +0000 (+0000) Subject: Stubs for hebrew and arabic language files; support for 'dir=rtl' on html element X-Git-Tag: 1.1.0~434 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=3a35c1742b9d1b596616ac00c31687fcf20cc034;p=lhc%2Fweb%2Fwiklou.git Stubs for hebrew and arabic language files; support for 'dir=rtl' on html element --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 17586b07f6..0c623f3971 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1361,14 +1361,15 @@ class OutputPage { /* private */ function headElement() { - global $wgDocType, $wgDTD, $wgUser, $wgLanguageCode, $wgOutputEncoding; + global $wgDocType, $wgDTD, $wgUser, $wgLanguageCode, $wgOutputEncoding, $wgLang; $ret = "\n"; if ( "" == $this->mHTMLtitle ) { $this->mHTMLtitle = $this->mPagetitle; } - $ret .= "{$this->mHTMLtitle}\n"; + $rtl = $wgLang->isRTL() ? " dir='RTL'" : ""; + $ret .= "{$this->mHTMLtitle}\n"; array_push( $this->mMetatags, array( "http:Content-type", "text/html; charset={$wgOutputEncoding}" ) ); foreach ( $this->mMetatags as $tag ) { if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) { diff --git a/languages/Language.php b/languages/Language.php index 232089a59a..2150a978e0 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1450,9 +1450,13 @@ class Language { } return $text; } + + # For right-to-left language support + function isRTL() { return false; } } global $IP; @include_once( "{$IP}/Language" . ucfirst( $wgLanguageCode ) . ".php" ); ?> +v \ No newline at end of file diff --git a/languages/LanguageAr.php b/languages/LanguageAr.php new file mode 100644 index 0000000000..b08b06bde7 --- /dev/null +++ b/languages/LanguageAr.php @@ -0,0 +1,29 @@ + diff --git a/languages/LanguageHe.php b/languages/LanguageHe.php new file mode 100644 index 0000000000..d7a0c11aca --- /dev/null +++ b/languages/LanguageHe.php @@ -0,0 +1,29 @@ +