* (bug 5493) Id translation for special pages
[lhc/web/wiklou.git] / languages / LanguageSq.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Language
5 */
6
7 require_once("LanguageUtf8.php");
8
9 /* private */ $wgNamespaceNamesSq = array(
10 NS_MEDIA => "Media",
11 NS_SPECIAL => "Speciale",
12 NS_MAIN => "",
13 NS_TALK => "Diskutim",
14 NS_USER => "Përdoruesi",
15 NS_USER_TALK => "Përdoruesi_diskutim",
16 NS_PROJECT => $wgMetaNamespace,
17 NS_PROJECT_TALK => $wgMetaNamespace . "_diskutim",
18 NS_IMAGE => "Figura",
19 NS_IMAGE_TALK => "Figura_diskutim",
20 NS_MEDIAWIKI => "MediaWiki",
21 NS_MEDIAWIKI_TALK => "MediaWiki_diskutim",
22 NS_TEMPLATE => "Stampa",
23 NS_TEMPLATE_TALK => "Stampa_diskutim",
24 NS_HELP => 'Ndihmë',
25 NS_HELP_TALK => 'Ndihmë_diskutim'
26 ) + $wgNamespaceNamesEn;
27
28 /* private */ $wgQuickbarSettingsSq = array(
29 "Asgjë", "Lidhur majtas", "Lidhur djathtas", "Fluturo majtas"
30 );
31
32 /* private */ $wgSkinNamesSq = array(
33 'standard' => "Standarte",
34 'nostalgia' => "Nostalgjike",
35 'cologneblue' => "Kolonjë Blu"
36 ) + $wgSkinNamesEn;
37
38
39 /* private */ $wgDateFormatsSq = array(
40 # "Pa preferencë",
41 );
42
43 if (!$wgCachedMessageArrays) {
44 require_once('MessagesSq.php');
45 }
46
47 class LanguageSq extends LanguageUtf8 {
48
49 function getNamespaces() {
50 global $wgNamespaceNamesSq;
51 return $wgNamespaceNamesSq;
52 }
53
54 function getNsIndex( $text ) {
55 global $wgNamespaceNamesSq;
56 foreach ( $wgNamespaceNamesSq as $i => $n ) {
57 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
58 }
59 # Compatbility with alt names:
60 if( 0 == strcasecmp( "Perdoruesi", $text ) ) return 2;
61 if( 0 == strcasecmp( "Perdoruesi_diskutim", $text ) ) return 3;
62 return false;
63 }
64
65 function getQuickbarSettings() {
66 global $wgQuickbarSettingsSq;
67 return $wgQuickbarSettingsSq;
68 }
69
70 function getSkinNames() {
71 global $wgSkinNamesSq;
72 return $wgSkinNamesSq;
73 }
74
75 function getDateFormats() {
76 global $wgDateFormatsSq;
77 return $wgDateFormatsSq;
78 }
79
80 # localised date and time
81 function date( $ts, $adj = false ) {
82 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
83
84 $d = substr( $ts, 0, 4 ) . " " .
85 $this->getMonthName( substr( $ts, 4, 2 ) ) . " ".
86 (0 + substr( $ts, 6, 2 ));
87 return $d;
88 }
89
90 function time( $ts, $adj = false ) {
91 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
92
93 $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
94 return $t;
95 }
96
97 function timeanddate( $ts, $adj = false ) {
98 return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
99 }
100
101 function getMessage( $key ) {
102 global $wgAllMessagesSq;
103 if(array_key_exists($key, $wgAllMessagesSq))
104 return $wgAllMessagesSq[$key];
105 else
106 return parent::getMessage($key);
107 }
108
109 function formatNum( $number ) {
110 global $wgTranslateNumerals;
111 return $wgTranslateNumerals ? strtr($number, '.,', ',.' ) : $number;
112 }
113
114 }
115
116 ?>