languagehe.php

来自「php 开发的内容管理系统」· PHP 代码 · 共 310 行 · 第 1/2 页

PHP
310
字号
			NS_HELP_TALK      => "砖讬讞转_注讝专讛",			NS_CATEGORY       => "拽讟讙讜专讬讛",			NS_CATEGORY_TALK  => "砖讬讞转_拽讟讙讜专讬讛",		);	}		/**	 * Changing the default quickbar setting to "2" - right instead of left, as we use RTL interface	 *	 * @return array of the default user options	 */	function getDefaultUserOptions() {		$opt = parent::getDefaultUserOptions();		$opt["quickbar"] = 2;		return $opt;	}		/**	 * @return array of Hebrew bookstore list	 */	function getBookstoreList() {		return $this->mBookstoreListHe;	}		/**	 * @return array of Hebrew namespace names	 */	function getNamespaces() {		return $this->mNamespaceNamesHe + parent::getNamespaces();	}		/**	 * @return array of Hebrew skin names	 */	function getSkinNames() {		return $this->mSkinNamesHe + parent::getSkinNames();	}		/**	 * @return array of Hebrew quickbar settings	 */	function getQuickbarSettings() {		return $this->mQuickbarSettingsHe;	}		/**	 * The function returns a message, in Hebrew if exists, in English if not, only from the default translations here.	 *	 * @param string the message key	 *	 * @return string of the wanted message	 */	function getMessage( $key ) {		if( isset( $this->mMessagesHe[$key] ) ) {			return $this->mMessagesHe[$key];		} else {			return parent::getMessage( $key );		}	}		/**	 * @return array of all the Hebrew messages	 */	function getAllMessages() {		return $this->mMessagesHe;	}		/**	 * @return array of all the magic words	 */	function &getMagicWords() {		return $this->mMagicWordsHe;	}		/**	 * @return true, as Hebrew is RTL language	 */	function isRTL() {		return true;	}		/**	 * @return regular expression which includes the word trails in the link	 */	function linkTrail() {		return '/^([a-z讗-转]+)(.*)$/sDu';	}		/**	 * Convert grammar forms of words.	 *	 * Available cases:	 * "prefixed" (or "转讞讬诇讬转") - when the word has a prefix	 *	 * @param string the word to convert	 * @param string the case	 */	function convertGrammar( $word, $case ) {		global $wgGrammarForms;		if ( isset($wgGrammarForms['he'][$case][$word]) ) {			return $wgGrammarForms['he'][$case][$word];		}				switch ( $case ) {			case 'prefixed':			case '转讞讬诇讬转':				# Duplicate the "Waw" if prefixed				if ( substr( $word, 0, 2 ) == "讜" && substr( $word, 0, 4 ) != "讜讜" ) {					$word = "讜".$word;				}								# Remove the "He" if prefixed				if ( substr( $word, 0, 2 ) == "讛" ) {					$word = substr( $word, 2 );				}								# Add a hyphen if non-Hebrew letters				if ( substr( $word, 0, 2 ) < "讗" || substr( $word, 0, 2 ) > "转" ) {					$word = "志".$word;				}		}				return $word;	}		/**	 * Gets a number and uses the suited form of the word.	 *	 * @param integer the number of items	 * @param string the first form (singular)	 * @param string the second form (plural)	 * @param string the third form (2 items, plural is used if not applicable and not specified)	 *	 * @return string of the suited form of word	 */	function convertPlural( $count, $wordform1, $wordform2, $wordform3) {		if ( $count == '1' ) {			return $wordform1;		} elseif ( $count == '2' && $wordform3 ) {			return $wordform3;		} else {			return $wordform2;		}	}		/**	 * @return string of the best 8-bit encoding for Hebrew, if UTF-8 cannot be used	 */	function fallback8bitEncoding() {		return "windows-1255";	}}?>

⌨️ 快捷键说明

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