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