8 * @author Rotem Dan (July 2003)
9 * @author Rotem Liss (March 2006 on)
12 require_once("LanguageUtf8.php");
14 if (!$wgCachedMessageArrays) {
15 require_once('MessagesHe.php');
18 class LanguageHe
extends LanguageUtf8
{
19 private $mMessagesHe, $mNamespaceNamesHe = null;
21 private $mSkinNamesHe = array(
23 "nostalgia" => "נוסטלגי",
24 "cologneblue" => "מים כחולים",
25 "davinci" => "דה־וינצ'י",
28 "monobook" => "מונובוק",
29 "myskin" => "הרקע שלי",
33 private $mQuickbarSettingsHe = array(
34 "ללא", "קבוע משמאל", "קבוע מימין", "צף משמאל", "צף מימין"
37 private $mBookstoreListHe = array(
38 "מיתוס" => "http://www.mitos.co.il/",
39 "iBooks" => "http://www.ibooks.co.il/",
40 "Barnes & Noble" => "http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=\$1",
41 "Amazon.com" => "http://www.amazon.com/exec/obidos/ISBN=\$1"
45 * Constructor, setting the namespaces
47 function LanguageHe() {
48 LanguageUtf8
::LanguageUtf8();
50 global $wgAllMessagesHe;
51 $this->mMessagesHe
= &$wgAllMessagesHe;
53 global $wgMetaNamespace;
54 $this->mNamespaceNamesHe
= array(
56 NS_SPECIAL
=> "מיוחד",
60 NS_USER_TALK
=> "שיחת_משתמש",
61 NS_PROJECT
=> $wgMetaNamespace,
62 NS_PROJECT_TALK
=> "שיחת_" . $wgMetaNamespace,
64 NS_IMAGE_TALK
=> "שיחת_תמונה",
65 NS_MEDIAWIKI
=> "מדיה_ויקי",
66 NS_MEDIAWIKI_TALK
=> "שיחת_מדיה_ויקי",
67 NS_TEMPLATE
=> "תבנית",
68 NS_TEMPLATE_TALK
=> "שיחת_תבנית",
70 NS_HELP_TALK
=> "שיחת_עזרה",
71 NS_CATEGORY
=> "קטגוריה",
72 NS_CATEGORY_TALK
=> "שיחת_קטגוריה",
77 * Changing the default quickbar setting to "2" - right instead of left, as we use RTL interface
79 * @return array of the default user options
81 function getDefaultUserOptions() {
82 $opt = parent
::getDefaultUserOptions();
88 * @return array of Hebrew bookstore list
90 function getBookstoreList() {
91 return $this->mBookstoreListHe
;
95 * @return array of Hebrew namespace names
97 function getNamespaces() {
98 return $this->mNamespaceNamesHe + parent
::getNamespaces();
102 * @return array of Hebrew skin names
104 function getSkinNames() {
105 return $this->mSkinNamesHe + parent
::getSkinNames();
109 * @return array of Hebrew quickbar settings
111 function getQuickbarSettings() {
112 return $this->mQuickbarSettingsHe
;
116 * The function returns a message, in Hebrew if exists, in English if not, only from the default translations here.
118 * @param string the message key
120 * @return string of the wanted message
122 function getMessage( $key ) {
123 if( isset( $this->mMessagesHe
[$key] ) ) {
124 return $this->mMessagesHe
[$key];
126 return parent
::getMessage( $key );
131 * @return array of all the Hebrew messages
133 function getAllMessages() {
134 return $this->mMessagesHe
;
138 * @return true, as Hebrew is RTL language
145 * Gets a number and uses the suited form of the word.
147 * Needed for Hebrew as some words also has a form for two instances - for example, year or shoe -
148 * and the third parameter is used for them.
150 * When the word has only signular and plural forms, the plural form will be used for 2.
152 * @param integer $count
153 * @param string $wordform1
154 * @param string $wordform2
155 * @param string $wordform3 (optional)
157 * @return string of the suited form of word
159 function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
160 if ( $count == '1' ) {
162 } elseif ( $count == '2' && $wordform3 ) {
170 * @return string of the best 8-bit encoding for Hebrew, if UTF-8 cannot be used
172 function fallback8bitEncoding() {
173 return "windows-1255";