Index: branches/REL1_3/phase3/languages/LanguageNv.php |
— | — | @@ -1,16 +1,14 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +# Navajo language file |
| 5 | +# No messages at the moment, just all the other stuff |
| 6 | + |
4 | 7 | require_once( "LanguageUtf8.php" ); |
5 | 8 | |
6 | | -# The names of the namespaces can be set here, but the numbers |
7 | | -# are magical, so don't change or move them! The Namespace class |
8 | | -# encapsulates some of the magic-ness. |
9 | | -# |
10 | | - |
11 | 9 | if($wgMetaNamespace === FALSE) |
12 | 10 | $wgMetaNamespace = str_replace( ' ', '_', $wgSitename ); |
13 | 11 | |
14 | | -/* private */ $wgNamespaceNamesnv = array( |
| 12 | +/* private */ $wgNamespaceNamesNv = array( |
15 | 13 | NS_MEDIA => 'Media', |
16 | 14 | NS_SPECIAL => 'Special', |
17 | 15 | NS_MAIN => '', |
— | — | @@ -31,7 +29,7 @@ |
32 | 30 | NS_CATEGORY_TALK => 'T\'ááłáhági_át\'éego_baa_yinísht\'į́' |
33 | 31 | ); |
34 | 32 | |
35 | | -/* private */ $wgDefaultUserOptionsnv = array( |
| 33 | +/* private */ $wgDefaultUserOptionsNv = array( |
36 | 34 | 'quickbar' => 1, 'underline' => 1, 'hover' => 1, |
37 | 35 | 'cols' => 80, 'rows' => 25, 'searchlimit' => 20, |
38 | 36 | 'contextlines' => 5, 'contextchars' => 50, |
— | — | @@ -42,11 +40,11 @@ |
43 | 41 | 'date' => 0 |
44 | 42 | ); |
45 | 43 | |
46 | | -/* private */ $wgQuickbarSettingsnv = array( |
| 44 | +/* private */ $wgQuickbarSettingsNv = array( |
47 | 45 | 'None', 'Fixed left', 'Fixed right', 'Floating left' |
48 | 46 | ); |
49 | 47 | |
50 | | -/* private */ $wgSkinNamesnv = array( |
| 48 | +/* private */ $wgSkinNamesNv = array( |
51 | 49 | 'standard' => 'Standard', |
52 | 50 | 'nostalgia' => 'Nostalgia', |
53 | 51 | 'cologneblue' => 'Cologne Blue', |
— | — | @@ -56,14 +54,7 @@ |
57 | 55 | 'myskin' => 'MySkin' |
58 | 56 | ); |
59 | 57 | |
60 | | -define( "MW_MATH_PNG", 0 ); |
61 | | -define( "MW_MATH_SIMPLE", 1 ); |
62 | | -define( "MW_MATH_HTML", 2 ); |
63 | | -define( "MW_MATH_SOURCE", 3 ); |
64 | | -define( "MW_MATH_MODERN", 4 ); |
65 | | -define( "MW_MATH_MATHML", 5 ); |
66 | | - |
67 | | -/* private */ $wgMathNamesnv = array( |
| 58 | +/* private */ $wgMathNamesNv = array( |
68 | 59 | MW_MATH_PNG => 'Always render PNG', |
69 | 60 | MW_MATH_SIMPLE => 'HTML if very simple or else PNG', |
70 | 61 | MW_MATH_HTML => 'HTML if possible or else PNG', |
— | — | @@ -72,7 +63,7 @@ |
73 | 64 | MW_MATH_MATHML => 'MathML if possible (experimental)', |
74 | 65 | ); |
75 | 66 | |
76 | | -/* private */ $wgDateFormatsnv = array( |
| 67 | +/* private */ $wgDateFormatsNv = array( |
77 | 68 | 'No preference', |
78 | 69 | 'Yas Niłt\'ees 15, 2001', |
79 | 70 | '15 Yas Niłt\'ees 2001', |
— | — | @@ -80,7 +71,7 @@ |
81 | 72 | '2001-01-15' |
82 | 73 | ); |
83 | 74 | |
84 | | -/* private */ $wgUserTogglesnv = array( |
| 75 | +/* private */ $wgUserTogglesNv = array( |
85 | 76 | 'hover' => 'Show hoverbox over wiki links', |
86 | 77 | 'underline' => 'Biyaadi iissoh', |
87 | 78 | 'highlightbroken' => 'Format broken links <a href="" class="new">like |
— | — | @@ -102,7 +93,7 @@ |
103 | 94 | 'nocache' => 'Naaltsoos doo nooh yishchí da' |
104 | 95 | ); |
105 | 96 | |
106 | | -/* private */ $wgBookstoreListnv = array( |
| 97 | +/* private */ $wgBookstoreListNv = array( |
107 | 98 | "AddALL" => "http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN", |
108 | 99 | "PriceSCAN" => "http://www.pricescan.com/books/bookDetail.asp?isbn=$1", |
109 | 100 | "Barnes & Noble" => "http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1", |
— | — | @@ -110,29 +101,18 @@ |
111 | 102 | //"ISBN" => "$1" |
112 | 103 | ); |
113 | 104 | |
114 | | -# Read language names |
115 | | -global $wgLanguageNames; |
116 | | -require_once( "Names.php" ); |
117 | | - |
118 | | -$wgLanguageNamesnv =& $wgLanguageNames; |
119 | | - |
120 | | - |
121 | | -/* private */ $wgWeekdayNamesnv = array( |
| 105 | +/* private */ $wgWeekdayNamesNv = array( |
122 | 106 | 'Damóogo', 'Damóo biiskání', 'Damóodóó naakiską́o', 'Damóodóó tágí jį́', 'Damóodóó dį́į́\' yiską́o', |
123 | 107 | 'Nda\'iiníísh', 'Yiską́ damóo' |
124 | 108 | ); |
125 | 109 | |
126 | | -/* private */ $wgWeekdayAbbreviationsJa = array( |
127 | | - "Dam", "Dm1", "Dm2", "Dm3", "Dm4", "Nda", "Ysk" |
128 | | -); |
129 | | - |
130 | | -/* private */ $wgMonthNamesnv = array( |
| 110 | +/* private */ $wgMonthNamesNv = array( |
131 | 111 | 'Yas Niłt\'ees', 'Atsá Biyáázh', 'Wóózhch\'į́į́d', 'T\'ą́ą́chil', 'T\'ą́ą́tsoh', 'Ya\'iishjááshchilí', |
132 | 112 | 'Ya\'iishjáástsoh', 'Bini\'ant\'ą́ą́ts\'ózí', 'Bini\'ant\'ą́ą́tsoh', 'Ghąąjį', 'Níłch\'its\'ósí', |
133 | 113 | 'Níłch\'itsoh' |
134 | 114 | ); |
135 | 115 | |
136 | | -/* private */ $wgMonthAbbreviationsnv = array( |
| 116 | +/* private */ $wgMonthAbbreviationsNv = array( |
137 | 117 | 'Ynts', 'Atsb', 'Wozh', 'Tchi', 'Ttso', 'Yjsh', 'Yjts', 'Btsz', |
138 | 118 | 'Btsx', 'Ghąj', 'Ntss', 'Ntsx' |
139 | 119 | ); |
— | — | @@ -141,7 +121,7 @@ |
142 | 122 | # Please include the English words as synonyms. This allows people |
143 | 123 | # from other wikis to contribute more easily. |
144 | 124 | # |
145 | | -/* private */ $wgMagicWordsnv = array( |
| 125 | +/* private */ $wgMagicWordsNv = array( |
146 | 126 | # ID CASE SYNONYMS |
147 | 127 | MAG_REDIRECT => array( 0, '#redirect' ), |
148 | 128 | MAG_NOTOC => array( 0, '__NOTOC__' ), |
— | — | @@ -156,8 +136,8 @@ |
157 | 137 | MAG_CURRENTTIME => array( 1, 'CURRENTTIME' ), |
158 | 138 | MAG_NUMBEROFARTICLES => array( 1, 'NUMBEROFARTICLES' ), |
159 | 139 | MAG_CURRENTMONTHNAMEGEN => array( 1, 'CURRENTMONTHNAMEGEN' ), |
160 | | - MAG_PAGENAME => array( 1, 'PAGENAME' ), |
161 | | - MAG_NAMESPACE => array( 1, 'NAMESPACE' ), |
| 140 | + MAG_PAGENAME => array( 1, 'PAGENAME' ), |
| 141 | + MAG_NAMESPACE => array( 1, 'NAMESPACE' ), |
162 | 142 | MAG_MSG => array( 0, 'MSG:' ), |
163 | 143 | MAG_SUBST => array( 0, 'SUBST:' ), |
164 | 144 | MAG_MSGNW => array( 0, 'MSGNW:' ), |
— | — | @@ -168,7 +148,7 @@ |
169 | 149 | MAG_IMG_NONE => array( 1, 'none' ), |
170 | 150 | MAG_IMG_WIDTH => array( 1, '$1px' ), |
171 | 151 | MAG_IMG_CENTER => array( 1, 'center', 'centre' ), |
172 | | - MAG_IMG_FRAMED => array( 1, 'framed', 'enframed', 'frame' ), |
| 152 | + MAG_IMG_FRAMED => array( 1, 'framed', 'enframed', 'frame' ), |
173 | 153 | MAG_INT => array( 0, 'INT:' ), |
174 | 154 | MAG_SITENAME => array( 1, 'SITENAME' ), |
175 | 155 | MAG_NS => array( 0, 'NS:' ), |
— | — | @@ -197,82 +177,60 @@ |
198 | 178 | # Internationalisation code |
199 | 179 | #-------------------------------------------------------------------------- |
200 | 180 | |
201 | | -class Language { |
202 | | - function Language(){ |
203 | | - # Copies any missing values in the specified arrays from En to the current language |
204 | | - $fillin = array( 'wgSysopSpecialPages', 'wgValidSpecialPages', 'wgDeveloperSpecialPages' ); |
205 | | - $name = get_class( $this ); |
206 | | - if( strpos( $name, 'language' ) == 0){ |
207 | | - $lang = ucfirst( substr( $name, 8 ) ); |
208 | | - foreach( $fillin as $arrname ){ |
209 | | - $langver = "{$arrname}{$lang}"; |
210 | | - $enver = "{$arrname}En"; |
211 | | - if( ! isset( $GLOBALS[$langver] ) || ! isset( $GLOBALS[$enver] )) |
212 | | - continue; |
213 | | - foreach($GLOBALS[$enver] as $spage => $text){ |
214 | | - if( ! isset( $GLOBALS[$langver][$spage] ) ) |
215 | | - $GLOBALS[$langver][$spage] = $text; |
216 | | - } |
217 | | - } |
218 | | - } |
219 | | - } |
| 181 | +class LanguageNv extends LanguageUtf8 { |
220 | 182 | |
221 | 183 | function getDefaultUserOptions () { |
222 | | - global $wgDefaultUserOptionsnv ; |
223 | | - return $wgDefaultUserOptionsnv ; |
| 184 | + global $wgDefaultUserOptionsNv ; |
| 185 | + return $wgDefaultUserOptionsNv ; |
224 | 186 | } |
225 | 187 | |
226 | 188 | function getBookstoreList () { |
227 | | - global $wgBookstoreListnv ; |
228 | | - return $wgBookstoreListnv ; |
| 189 | + global $wgBookstoreListNv ; |
| 190 | + return $wgBookstoreListNv ; |
229 | 191 | } |
230 | 192 | |
231 | 193 | function getNamespaces() { |
232 | | - global $wgNamespaceNamesnv; |
233 | | - return $wgNamespaceNamesnv; |
| 194 | + global $wgNamespaceNamesNv; |
| 195 | + return $wgNamespaceNamesNv; |
234 | 196 | } |
235 | 197 | |
236 | 198 | function getNsText( $index ) { |
237 | | - global $wgNamespaceNamesnv; |
238 | | - return $wgNamespaceNamesnv[$index]; |
| 199 | + global $wgNamespaceNamesNv; |
| 200 | + return $wgNamespaceNamesNv[$index]; |
239 | 201 | } |
240 | 202 | |
241 | 203 | function getNsIndex( $text ) { |
242 | | - global $wgNamespaceNamesnv; |
| 204 | + global $wgNamespaceNamesNv; |
243 | 205 | |
244 | | - foreach ( $wgNamespaceNamesnv as $i => $n ) { |
| 206 | + foreach ( $wgNamespaceNamesNv as $i => $n ) { |
245 | 207 | if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
246 | 208 | } |
247 | 209 | return false; |
248 | 210 | } |
249 | 211 | |
250 | | - function specialPage( $name ) { |
251 | | - return $this->getNsText( Namespace::getSpecial() ) . ':' . $name; |
252 | | - } |
253 | | - |
254 | 212 | function getQuickbarSettings() { |
255 | | - global $wgQuickbarSettingsnv; |
256 | | - return $wgQuickbarSettingsnv; |
| 213 | + global $wgQuickbarSettingsNv; |
| 214 | + return $wgQuickbarSettingsNv; |
257 | 215 | } |
258 | 216 | |
259 | 217 | function getSkinNames() { |
260 | | - global $wgSkinNamesnv; |
261 | | - return $wgSkinNamesnv; |
| 218 | + global $wgSkinNamesNv; |
| 219 | + return $wgSkinNamesNv; |
262 | 220 | } |
263 | 221 | |
264 | 222 | function getMathNames() { |
265 | | - global $wgMathNamesnv; |
266 | | - return $wgMathNamesnv; |
| 223 | + global $wgMathNamesNv; |
| 224 | + return $wgMathNamesNv; |
267 | 225 | } |
268 | 226 | |
269 | 227 | function getDateFormats() { |
270 | | - global $wgDateFormatsnv; |
271 | | - return $wgDateFormatsnv; |
| 228 | + global $wgDateFormatsNv; |
| 229 | + return $wgDateFormatsNv; |
272 | 230 | } |
273 | 231 | |
274 | 232 | function getUserToggles() { |
275 | | - global $wgUserTogglesnv; |
276 | | - return $wgUserTogglesnv; |
| 233 | + global $wgUserTogglesNv; |
| 234 | + return $wgUserTogglesNv; |
277 | 235 | } |
278 | 236 | |
279 | 237 | function getUserToggle( $tog ) { |
— | — | @@ -280,23 +238,10 @@ |
281 | 239 | return $togs[$tog]; |
282 | 240 | } |
283 | 241 | |
284 | | - function getLanguageNames() { |
285 | | - global $wgLanguageNamesnv; |
286 | | - return $wgLanguageNamesnv; |
287 | | - } |
288 | | - |
289 | | - function getLanguageName( $code ) { |
290 | | - global $wgLanguageNamesnv; |
291 | | - if ( ! array_key_exists( $code, $wgLanguageNamesnv ) ) { |
292 | | - return ""; |
293 | | - } |
294 | | - return $wgLanguageNamesnv[$code]; |
295 | | - } |
296 | | - |
297 | 242 | function getMonthName( $key ) |
298 | 243 | { |
299 | | - global $wgMonthNamesnv; |
300 | | - return $wgMonthNamesnv[$key-1]; |
| 244 | + global $wgMonthNamesNv; |
| 245 | + return $wgMonthNamesNv[$key-1]; |
301 | 246 | } |
302 | 247 | |
303 | 248 | /* by default we just return base form */ |
— | — | @@ -307,264 +252,53 @@ |
308 | 253 | |
309 | 254 | function getMonthAbbreviation( $key ) |
310 | 255 | { |
311 | | - global $wgMonthAbbreviationsnv; |
312 | | - return @$wgMonthAbbreviationsnv[$key-1]; |
| 256 | + global $wgMonthAbbreviationsNv; |
| 257 | + return @$wgMonthAbbreviationsNv[$key-1]; |
313 | 258 | } |
314 | 259 | |
315 | 260 | function getWeekdayName( $key ) |
316 | 261 | { |
317 | | - global $wgWeekdayNamesnv; |
318 | | - return $wgWeekdayNamesnv[$key-1]; |
| 262 | + global $wgWeekdayNamesNv; |
| 263 | + return $wgWeekdayNamesNv[$key-1]; |
319 | 264 | } |
320 | 265 | |
321 | | - function userAdjust( $ts ) |
322 | | - { |
323 | | - global $wgUser, $wgLocalTZoffset; |
324 | | - |
325 | | - $tz = $wgUser->getOption( 'timecorrection' ); |
326 | | - if ( $tz === '' ) { |
327 | | - $hrDiff = isset( $wgLocalTZoffset ) ? $wgLocalTZoffset : 0; |
328 | | - $minDiff = 0; |
329 | | - } elseif ( strpos( $tz, ":" ) !== false ) { |
330 | | - $tzArray = explode( ":", $tz ); |
331 | | - $hrDiff = intval($tzArray[0]); |
332 | | - $minDiff = intval($hrDiff < 0 ? -$tzArray[1] : $tzArray[1]); |
333 | | - } else { |
334 | | - $hrDiff = intval( $tz ); |
335 | | - } |
336 | | - if ( 0 == $hrDiff && 0 == $minDiff ) { return $ts; } |
337 | | - |
338 | | - $t = mktime( ( |
339 | | - (int)substr( $ts, 8, 2) ) + $hrDiff, # Hours |
340 | | - (int)substr( $ts, 10, 2 ) + $minDiff, # Minutes |
341 | | - (int)substr( $ts, 12, 2 ), # Seconds |
342 | | - (int)substr( $ts, 4, 2 ), # Month |
343 | | - (int)substr( $ts, 6, 2 ), # Day |
344 | | - (int)substr( $ts, 0, 4 ) ); #Year |
345 | | - return date( 'YmdHis', $t ); |
346 | | - } |
347 | | - |
348 | | - function date( $ts, $adj = false ) |
349 | | - { |
350 | | - global $wgAmericanDates, $wgUser, $wgUseDynamicDates; |
351 | | - |
352 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
353 | | - |
354 | | - if ( $wgUseDynamicDates ) { |
355 | | - $datePreference = $wgUser->getOption( 'date' ); |
356 | | - if ( $datePreference == 0 ) { |
357 | | - $datePreference = $wgAmericanDates ? 1 : 2; |
358 | | - } |
359 | | - } else { |
360 | | - $datePreference = $wgAmericanDates ? 1 : 2; |
361 | | - } |
362 | | - |
363 | | - $month = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ); |
364 | | - $day = $this->formatNum( 0 + substr( $ts, 6, 2 ) ); |
365 | | - $year = $this->formatNum( substr( $ts, 0, 4 ) ); |
366 | | - |
367 | | - switch( $datePreference ) { |
368 | | - case 1: return "$month $day, $year"; |
369 | | - case 2: return "$day $month $year"; |
370 | | - default: return "$year $month $day"; |
371 | | - } |
372 | | - } |
373 | | - |
374 | | - function time( $ts, $adj = false, $seconds = false ) |
375 | | - { |
376 | | - if ( $adj ) { $ts = $this->userAdjust( $ts ); } |
377 | | - |
378 | | - $t = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 ); |
379 | | - if ( $seconds ) { |
380 | | - $t .= ':' . substr( $ts, 12, 2 ); |
381 | | - } |
382 | | - return $this->formatNum( $t ); |
383 | | - } |
384 | | - |
385 | | - function timeanddate( $ts, $adj = false ) |
386 | | - { |
387 | | - return $this->time( $ts, $adj ) . ', ' . $this->date( $ts, $adj ); |
388 | | - } |
389 | | - |
390 | | - function rfc1123( $ts ) |
391 | | - { |
392 | | - return date( 'D, d M Y H:i:s T', $ts ); |
393 | | - } |
394 | | - |
395 | 266 | function getValidSpecialPages() |
396 | 267 | { |
397 | | - global $wgValidSpecialPagesnv; |
398 | | - return $wgValidSpecialPagesnv; |
| 268 | + global $wgValidSpecialPagesNv; |
| 269 | + return $wgValidSpecialPagesNv; |
399 | 270 | } |
400 | 271 | |
401 | 272 | function getSysopSpecialPages() |
402 | 273 | { |
403 | | - global $wgSysopSpecialPagesnv; |
404 | | - return $wgSysopSpecialPagesnv; |
| 274 | + global $wgSysopSpecialPagesNv; |
| 275 | + return $wgSysopSpecialPagesNv; |
405 | 276 | } |
406 | 277 | |
407 | 278 | function getDeveloperSpecialPages() |
408 | 279 | { |
409 | | - global $wgDeveloperSpecialPagesnv; |
410 | | - return $wgDeveloperSpecialPagesnv; |
| 280 | + global $wgDeveloperSpecialPagesNv; |
| 281 | + return $wgDeveloperSpecialPagesNv; |
411 | 282 | } |
412 | 283 | |
| 284 | +/* |
413 | 285 | function getMessage( $key ) |
414 | 286 | { |
415 | | - global $wgAllMessagesnv; |
416 | | - return @$wgAllMessagesnv[$key]; |
| 287 | + global $wgAllMessagesNv; |
| 288 | + return @$wgAllMessagesNv[$key]; |
417 | 289 | } |
418 | 290 | |
419 | 291 | function getAllMessages() |
420 | 292 | { |
421 | | - global $wgAllMessagesnv; |
422 | | - return $wgAllMessagesnv; |
| 293 | + global $wgAllMessagesNv; |
| 294 | + return $wgAllMessagesNv; |
423 | 295 | } |
| 296 | +*/ |
424 | 297 | |
425 | | - function iconv( $in, $out, $string ) { |
426 | | - # For most languages, this is a wrapper for iconv |
427 | | - return iconv( $in, $out, $string ); |
428 | | - } |
429 | | - |
430 | | - function ucfirst( $string ) { |
431 | | - # For most languages, this is a wrapper for ucfirst() |
432 | | - return ucfirst( $string ); |
433 | | - } |
434 | | - |
435 | | - function lcfirst( $s ) { |
436 | | - return strtolower( $s{0} ). substr( $s, 1 ); |
437 | | - } |
438 | | - |
439 | | - function checkTitleEncoding( $s ) { |
440 | | - global $wgInputEncoding; |
441 | | - |
442 | | - # Check for UTF-8 URLs; Internet Explorer produces these if you |
443 | | - # type non-ASCII chars in the URL bar or follow unescaped links. |
444 | | - $ishigh = preg_match( '/[\x80-\xff]/', $s); |
445 | | - $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' . |
446 | | - '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true ); |
447 | | - |
448 | | - if( ($wgInputEncoding != 'utf-8') and $ishigh and $isutf ) |
449 | | - return @iconv( 'UTF-8', $wgInputEncoding, $s ); |
450 | | - |
451 | | - if( ($wgInputEncoding == 'utf-8') and $ishigh and !$isutf ) |
452 | | - return utf8_encode( $s ); |
453 | | - |
454 | | - # Other languages can safely leave this function, or replace |
455 | | - # it with one to detect and convert another legacy encoding. |
456 | | - return $s; |
457 | | - } |
458 | | - |
459 | | - function stripForSearch( $in ) { |
460 | | - # Some languages have special punctuation to strip out |
461 | | - # or characters which need to be converted for MySQL's |
462 | | - # indexing to grok it correctly. Make such changes here. |
463 | | - return $in; |
464 | | - } |
465 | | - |
466 | | - function firstChar( $s ) { |
467 | | - # Get the first character of a string. In ASCII, return |
468 | | - # first byte of the string. UTF8 and others have to |
469 | | - # overload this. |
470 | | - return $s[0]; |
471 | | - } |
472 | | - |
473 | | - function setAltEncoding() { |
474 | | - # Some languages may have an alternate char encoding option |
475 | | - # (Esperanto X-coding, Japanese furigana conversion, etc) |
476 | | - # If 'altencoding' is checked in user prefs, this gives a |
477 | | - # chance to swap out the default encoding settings. |
478 | | - #global $wgInputEncoding, $wgOutputEncoding, $wgEditEncoding; |
479 | | - } |
480 | | - |
481 | | - function recodeForEdit( $s ) { |
482 | | - # For some languages we'll want to explicitly specify |
483 | | - # which characters make it into the edit box raw |
484 | | - # or are converted in some way or another. |
485 | | - # Note that if wgOutputEncoding is different from |
486 | | - # wgInputEncoding, this text will be further converted |
487 | | - # to wgOutputEncoding. |
488 | | - global $wgInputEncoding, $wgEditEncoding; |
489 | | - if( $wgEditEncoding == '' or |
490 | | - $wgEditEncoding == $wgInputEncoding ) { |
491 | | - return $s; |
492 | | - } else { |
493 | | - return $this->iconv( $wgInputEncoding, $wgEditEncoding, $s ); |
494 | | - } |
495 | | - } |
496 | | - |
497 | | - function recodeInput( $s ) { |
498 | | - # Take the previous into account. |
499 | | - global $wgInputEncoding, $wgOutputEncoding, $wgEditEncoding; |
500 | | - if($wgEditEncoding != "") { |
501 | | - $enc = $wgEditEncoding; |
502 | | - } else { |
503 | | - $enc = $wgOutputEncoding; |
504 | | - } |
505 | | - if( $enc == $wgInputEncoding ) { |
506 | | - return $s; |
507 | | - } else { |
508 | | - return $this->iconv( $enc, $wgInputEncoding, $s ); |
509 | | - } |
510 | | - } |
511 | | - |
512 | | - # For right-to-left language support |
513 | | - function isRTL() { return false; } |
514 | | - |
515 | | - # To allow "foo[[bar]]" to extend the link over the whole word "foobar" |
516 | | - function linkPrefixExtension() { return false; } |
517 | | - |
518 | | - |
519 | 298 | function &getMagicWords() |
520 | 299 | { |
521 | | - global $wgMagicWordsnv; |
522 | | - return $wgMagicWordsnv; |
| 300 | + global $wgMagicWordsNv; |
| 301 | + return $wgMagicWordsNv; |
523 | 302 | } |
524 | | - |
525 | | - # Fill a MagicWord object with data from here |
526 | | - function getMagic( &$mw ) |
527 | | - { |
528 | | - $raw =& $this->getMagicWords(); |
529 | | - if( !isset( $raw[$mw->mId] ) ) { |
530 | | - # Fall back to English if local list is incomplete |
531 | | - $raw =& Language::getMagicWords(); |
532 | | - } |
533 | | - $rawEntry = $raw[$mw->mId]; |
534 | | - $mw->mCaseSensitive = $rawEntry[0]; |
535 | | - $mw->mSynonyms = array_slice( $rawEntry, 1 ); |
536 | | - } |
537 | | - |
538 | | - # Italic is unsuitable for some languages |
539 | | - function emphasize( $text ) |
540 | | - { |
541 | | - return '<em>'.$text.'</em>'; |
542 | | - } |
543 | | - |
544 | | - |
545 | | - # Normally we use the plain ASCII digits. Some languages such as Arabic will |
546 | | - # want to output numbers using script-appropriate characters: override this |
547 | | - # function with a translator. See LanguageAr.php for an example. |
548 | | - function formatNum( $number ) { |
549 | | - return $number; |
550 | | - } |
551 | | - |
552 | | - function listToText( $l ) { |
553 | | - $s = ''; |
554 | | - $m = count($l) - 1; |
555 | | - for ($i = $m; $i >= 0; $i--) { |
556 | | - if ($i == $m) { |
557 | | - $s = $l[$i]; |
558 | | - } else if ($i == $m - 1) { |
559 | | - $s = $l[$i] . ' ' . $this->getMessage('and') . ' ' . $s; |
560 | | - } else { |
561 | | - $s = $l[$i] . ', ' . $s; |
562 | | - } |
563 | | - } |
564 | | - return $s; |
565 | | - } |
566 | 303 | } |
567 | 304 | |
568 | | -# This should fail gracefully if there's not a localization available |
569 | | -@include_once( 'Language' . ucfirst( $wgLanguageCode ) . '.php' ); |
570 | 305 | ?> |
571 | | - |