r2463 MediaWiki - Code Review archive

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

Diff [purge]

Index: trunk/phase3/languages/LanguageAr.php
@@ -2,11 +2,50 @@
33 # See language.doc
44 include_once("LanguageUtf8.php");
55
 6+$wgNamespaceNamesAr = array(
 7+ "-2" => "ملف",
 8+ "-1" => "خاص",
 9+ "0" => "",
 10+ "1" => "نقاش",
 11+ "2" => "مستخدم",
 12+ "3" => "نقاش_المستخدم",
 13+ "4" => "ويكيبيديا",
 14+ "5" => "ويكيبيديا_نقاش",
 15+ "6" => "صورة",
 16+ "7" => "نقاش_الصورة",
 17+ "8" => "MediaWiki",
 18+ "9" => "MediaWiki_talk",
 19+);
 20+
621 class LanguageAr extends LanguageUtf8 {
722 # TODO: TRANSLATION!
823
924 # Inherit everything except...
1025
 26+ function getNamespaces()
 27+ {
 28+ global $wgNamespaceNamesAr;
 29+ return $wgNamespaceNamesAr;
 30+ }
 31+
 32+
 33+ function getNsText( $index )
 34+ {
 35+ global $wgNamespaceNamesAr;
 36+ return $wgNamespaceNamesAr[$index];
 37+ }
 38+
 39+ function getNsIndex( $text )
 40+ {
 41+ global $wgNamespaceNamesAr;
 42+
 43+ foreach ( $wgNamespaceNamesAr as $i => $n )
 44+ {
 45+ if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
 46+ }
 47+ return LanguageUtf8::getNsIndex( $text );
 48+ }
 49+
1150 function isRTL() { return true; }
1251
1352 function getDefaultUserOptions () {

Status & tagging log