languageis.php

来自「php 开发的内容管理系统」· PHP 代码 · 共 177 行

PHP
177
字号
<?php/** Icelandic (脥slenska) * * @package MediaWiki * @subpackage Language */# Most of this was written by 脝var Arnfj枚r冒 Bjarmason <avarab@gmail.com>require_once( 'LanguageUtf8.php' );if (!$wgCachedMessageArrays) {	require_once('MessagesIs.php');}class LanguageIs extends LanguageUtf8 {	private $mMessagesIs, $mNamespaceNamesIs = null;	private $mQuickbarSettingsIs = array(		'Sleppa', 'Fast vinstra megin', 'Fast h忙gra megin', 'Flj贸tandi til vinstri'	);		private $mSkinNamesIs = array(		'standard'	=> 'Klass铆skt',		'nostalgia'	=> 'Gamaldags',		'cologneblue'	=> 'K枚lnarbl谩tt',		'myskin'	=> 'Mitt 镁ema',	);		private $mDateFormatsIs = array(		'Sj谩lfgefi冒',		'15. jan煤ar 2001 kl. 16:12',		'15. jan. 2001 kl. 16:12',		'16:12, 15. jan煤ar 2001',		'16:12, 15. jan. 2001',		'ISO 8601' => '2001-01-15 16:12:34'	);	private $mMagicWordsIs = array(		MAG_REDIRECT => array( 0, '#tilv铆sun', '#TILV脥SUN', '#redirect' ), // MagicWord::initRegex() sucks	);	function __construct() {		parent::__construct();		global $wgAllMessagesIs;		$this->mMessagesIs =& $wgAllMessagesIs;		global $wgMetaNamespace;		$this->mNamespaceNamesIs = array(			NS_MEDIA          => 'Mi冒ill',			NS_SPECIAL        => 'Kerfiss铆冒a',			NS_MAIN           => '',			NS_TALK           => 'Spjall',			NS_USER           => 'Notandi',			NS_USER_TALK      => 'Notandaspjall',			NS_PROJECT        => $wgMetaNamespace,			NS_PROJECT_TALK   => $wgMetaNamespace . 'spjall',			NS_IMAGE          => 'Mynd',			NS_IMAGE_TALK     => 'Myndaspjall',			NS_MEDIAWIKI      => 'Melding',			NS_MEDIAWIKI_TALK => 'Meldingarspjall',			NS_TEMPLATE       => 'Sni冒',			NS_TEMPLATE_TALK  => 'Sni冒aspjall',			NS_HELP           => 'Hj谩lp',			NS_HELP_TALK      => 'Hj谩lparspjall',			NS_CATEGORY       => 'Flokkur',			NS_CATEGORY_TALK  => 'Flokkaspjall'		);	}	function getNamespaces() {		return $this->mNamespaceNamesIs + parent::getNamespaces();	}	function getQuickbarSettings() {		return $this->mQuickbarSettingsIs;	}	function getSkinNames() {		return $this->mSkinNamesIs + parent::getSkinNames();	}	function getDateFormats() {		return $this->mDateFormatsIs;	}	function &getMagicWords()  {		$t = $this->mMagicWordsIs + parent::getMagicWords();		return $t;	}	function getMessage( $key ) {		if( isset( $this->mMessagesIs[$key] ) ) {			return $this->mMessagesIs[$key];		} else {			return parent::getMessage( $key );		}	}	function getAllMessages() {		return $this->mMessagesIs;	}	function date( $ts, $adj = false, $format = true) {		if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.		$format = $this->dateFormat($format);		switch( $format ) {			# 15. jan. 2001 kl. 16:12 || 16:12, 15. jan. 2001			case '2': case '4': return (0 + substr( $ts, 6, 2 )) . '. ' .				$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . '. ' .				substr($ts, 0, 4);			# 2001-01-15 16:12:34			case 'ISO 8601': return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);			# 15. jan煤ar 2001 kl. 16:12 || 16:12, 15. jan煤ar 2001			default: return (0 + substr( $ts, 6, 2 )) . '. ' .				$this->getMonthName( substr( $ts, 4, 2 ) ) . ' ' .				substr($ts, 0, 4);		}	}	function time($ts, $adj = false, $format = true) {		global $wgUser;		if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.		$format = $this->dateFormat($format);		switch( $format ) {			# 2001-01-15 16:12:34			case 'ISO 8601': return substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 ) . ':' . substr( $ts, 12, 2 );			default: return substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );		}	}	function timeanddate( $ts, $adj = false, $format = true) {		global $wgUser;		$format = $this->dateFormat($format);		switch ( $format ) {			# 16:12, 15. jan煤ar 2001 || 16:12, 15. jan. 2001			case '3': case '4': return $this->time( $ts, $adj, $format ) . ', ' . $this->date( $ts, $adj, $format );			# 2001-01-15 16:12:34			case 'ISO 8601': return $this->date( $ts, $adj, $format ) . ' ' . $this->time( $ts, $adj, $format );			# 15. jan煤ar 2001 kl. 16:12 || 15. jan. 2001 kl. 16:12			default: return $this->date( $ts, $adj, $format ) . ' kl. ' . $this->time( $ts, $adj, $format );		}	}	/**	 * The Icelandic number style uses dots where English would use commas	 * and commas where English would use dots, e.g. 201.511,17 not 201,511.17	 */	function separatorTransformTable() {		return array(',' => '.', '.' => ',' );	}	function linkPrefixExtension() {		// return '/^(.*?)([谩脕冒脨茅脡铆脥贸脫煤脷媒脻镁脼忙脝枚脰A-Za-z-鈥揮+)$/sDu';		return true;	}	function linkTrail() {		return '/^([谩冒茅铆贸煤媒镁忙枚a-z-鈥揮+)(.*)$/sDu';	}}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?