7 # Most of this was written by Ævar Arnfjörð Bjarmason <avarab@gmail.com>
9 require_once( 'LanguageUtf8.php' );
11 /* private */ $wgNamespaceNamesIs = array(
13 NS_SPECIAL
=> 'Kerfissíða',
17 NS_USER_TALK
=> 'Notandaspjall',
18 NS_PROJECT
=> $wgMetaNamespace,
19 NS_PROJECT_TALK
=> $wgMetaNamespace . 'spjall',
21 NS_IMAGE_TALK
=> 'Myndaspjall',
22 NS_MEDIAWIKI
=> 'Melding',
23 NS_MEDIAWIKI_TALK
=> 'Meldingarspjall',
24 NS_TEMPLATE
=> 'Snið',
25 NS_TEMPLATE_TALK
=> 'Sniðaspjall',
27 NS_HELP_TALK
=> 'Hjálparspjall',
28 NS_CATEGORY
=> 'Flokkur',
29 NS_CATEGORY_TALK
=> 'Flokkaspjall'
30 ) +
$wgNamespaceNamesEn;
32 /* private */ $wgQuickbarSettingsIs = array(
33 'Sleppa', 'Fast vinstra megin', 'Fast hægra megin', 'Fljótandi til vinstri'
36 /* private */ $wgSkinNamesIs = array(
37 'standard' => 'Klassískt',
38 'nostalgia' => 'Gamaldags',
39 'cologneblue' => 'Kölnarblátt',
40 'myskin' => 'Mitt þema',
43 /* private */ $wgDateFormatsIs = array(
45 '15. janúar 2001 kl. 16:12',
46 '15. jan. 2001 kl. 16:12',
47 '16:12, 15. janúar 2001',
48 '16:12, 15. jan. 2001',
49 'ISO 8601' => '2001-01-15 16:12:34'
52 $wgMagicWordsIs = array(
53 MAG_REDIRECT
=> array( 0, '#tilvísun', '#TILVÍSUN', '#redirect' ), // MagicWord::initRegex() sucks
56 if (!$wgCachedMessageArrays) {
57 require_once('MessagesIs.php');
60 #--------------------------------------------------------------------------
61 # Internationalisation code
62 #--------------------------------------------------------------------------
64 class LanguageIs
extends LanguageUtf8
{
66 function getNamespaces() {
67 global $wgNamespaceNamesIs;
68 return $wgNamespaceNamesIs;
71 function getQuickbarSettings() {
72 global $wgQuickbarSettingsIs;
73 return $wgQuickbarSettingsIs;
76 function getSkinNames() {
77 global $wgSkinNamesIs;
78 return $wgSkinNamesIs;
81 function getDateFormats() {
82 global $wgDateFormatsIs;
83 return $wgDateFormatsIs;
86 function getMessage( $key ) {
87 global $wgAllMessagesIs;
88 if( isset( $wgAllMessagesIs[$key] ) ) {
89 return $wgAllMessagesIs[$key];
91 return parent
::getMessage( $key );
95 function getAllMessages() {
96 global $wgAllMessagesIs;
97 return $wgAllMessagesIs;
100 function getMagicWords() {
101 global $wgMagicWordsIs;
102 return $wgMagicWordsIs;
105 function date( $ts, $adj = false, $format = true) {
107 if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
108 $format = $this->dateFormat($format);
111 # 15. jan. 2001 kl. 16:12 || 16:12, 15. jan. 2001
112 case '2': case '4': return (0 +
substr( $ts, 6, 2 )) . '. ' .
113 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . '. ' .
115 # 2001-01-15 16:12:34
116 case 'ISO 8601': return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
118 # 15. janúar 2001 kl. 16:12 || 16:12, 15. janúar 2001
119 default: return (0 +
substr( $ts, 6, 2 )) . '. ' .
120 $this->getMonthName( substr( $ts, 4, 2 ) ) . ' ' .
126 function time($ts, $adj = false, $format = true) {
128 if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
130 $format = $this->dateFormat($format);
133 # 2001-01-15 16:12:34
134 case 'ISO 8601': return substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 ) . ':' . substr( $ts, 12, 2 );
135 default: return substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
140 function timeanddate( $ts, $adj = false, $format = true) {
143 $format = $this->dateFormat($format);
146 # 16:12, 15. janúar 2001 || 16:12, 15. jan. 2001
147 case '3': case '4': return $this->time( $ts, $adj, $format ) . ', ' . $this->date( $ts, $adj, $format );
148 # 2001-01-15 16:12:34
149 case 'ISO 8601': return $this->date( $ts, $adj, $format ) . ' ' . $this->time( $ts, $adj, $format );
150 # 15. janúar 2001 kl. 16:12 || 15. jan. 2001 kl. 16:12
151 default: return $this->date( $ts, $adj, $format ) . ' kl. ' . $this->time( $ts, $adj, $format );
158 * The Icelandic number style uses dots where English would use commas
159 * and commas where English would use dots, e.g. 201.511,17 not 201,511.17
161 function formatNum( $number, $year = false ) {
162 return $year ?
$number : strtr($this->commafy($number), '.,', ',.' );
165 function linkPrefixExtension() {