r2464 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2463‎ | r2464 | r2465 >
Date:01:58, 9 February 2004
Author:vibber
Status:old
Tags:
Comment:
Add month names
Modified paths:
  • /trunk/phase3/languages/LanguageAr.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageAr.php
@@ -2,7 +2,7 @@
33 # See language.doc
44 include_once("LanguageUtf8.php");
55
6 -$wgNamespaceNamesAr = array(
 6+/* private */ $wgNamespaceNamesAr = array(
77 "-2" => "ملف",
88 "-1" => "خاص",
99 "0" => "",
@@ -17,6 +17,17 @@
1818 "9" => "MediaWiki_talk",
1919 );
2020
 21+/* private */ $wgWeekdayNamesAr = array(
 22+ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس",
 23+ "الجمعة", "السبت"
 24+);
 25+
 26+/* private */ $wgMonthNamesAr = array(
 27+ "يناير", "فبراير", "مارس", "ابريل", "مايو", "يونيو",
 28+ "يوليو", "أغسطس", "سبتمبر", "اكتوبر", "نوفمبر",
 29+ "ديسمبر"
 30+);
 31+
2132 class LanguageAr extends LanguageUtf8 {
2233 # TODO: TRANSLATION!
2334
@@ -46,6 +57,24 @@
4758 return LanguageUtf8::getNsIndex( $text );
4859 }
4960
 61+ function getMonthName( $key )
 62+ {
 63+ global $wgMonthNamesAr;
 64+ return $wgMonthNamesAr[$key-1];
 65+ }
 66+
 67+ function getMonthAbbreviation( $key )
 68+ {
 69+ /* No abbreviations in Arabic */
 70+ return $this->getMonthName( $key );
 71+ }
 72+
 73+ function getWeekdayName( $key )
 74+ {
 75+ global $wgWeekdayNamesAr;
 76+ return $wgWeekdayNamesAr[$key-1];
 77+ }
 78+
5079 function isRTL() { return true; }
5180
5281 function getDefaultUserOptions () {

Status & tagging log