2 /** Icelandic (Íslenska)
8 # Most of this was written by Ævar Arnfjörð Bjarmason <avarab@gmail.com>
10 require_once( 'LanguageUtf8.php' );
12 if (!$wgCachedMessageArrays) {
13 require_once('MessagesIs.php');
16 class LanguageIs
extends LanguageUtf8
{
17 private $mMessagesIs, $mNamespaceNamesIs = null;
19 private $mQuickbarSettingsIs = array(
20 'Sleppa', 'Fast vinstra megin', 'Fast hægra megin', 'Fljótandi til vinstri'
23 private $mSkinNamesIs = array(
24 'standard' => 'Klassískt',
25 'nostalgia' => 'Gamaldags',
26 'cologneblue' => 'Kölnarblátt',
27 'myskin' => 'Mitt þema',
30 private $mDateFormatsIs = array(
32 '15. janúar 2001 kl. 16:12',
33 '15. jan. 2001 kl. 16:12',
34 '16:12, 15. janúar 2001',
35 '16:12, 15. jan. 2001',
36 'ISO 8601' => '2001-01-15 16:12:34'
39 private $mMagicWordsIs = array(
40 MAG_REDIRECT
=> array( 0, '#tilvísun', '#TILVÍSUN', '#redirect' ), // MagicWord::initRegex() sucks
43 function __construct() {
44 parent
::__construct();
46 global $wgAllMessagesIs;
47 $this->mMessagesIs
=& $wgAllMessagesIs;
49 global $wgMetaNamespace;
50 $this->mNamespaceNamesIs
= array(
52 NS_SPECIAL
=> 'Kerfissíða',
56 NS_USER_TALK
=> 'Notandaspjall',
57 NS_PROJECT
=> $wgMetaNamespace,
58 NS_PROJECT_TALK
=> $wgMetaNamespace . 'spjall',
60 NS_IMAGE_TALK
=> 'Myndaspjall',
61 NS_MEDIAWIKI
=> 'Melding',
62 NS_MEDIAWIKI_TALK
=> 'Meldingarspjall',
63 NS_TEMPLATE
=> 'Snið',
64 NS_TEMPLATE_TALK
=> 'Sniðaspjall',
66 NS_HELP_TALK
=> 'Hjálparspjall',
67 NS_CATEGORY
=> 'Flokkur',
68 NS_CATEGORY_TALK
=> 'Flokkaspjall'
73 function getNamespaces() {
74 return $this->mNamespaceNamesIs + parent
::getNamespaces();
77 function getQuickbarSettings() {
78 return $this->mQuickbarSettingsIs
;
81 function getSkinNames() {
82 return $this->mSkinNamesIs + parent
::getSkinNames();
85 function getDateFormats() {
86 return $this->mDateFormatsIs
;
89 function &getMagicWords() {
90 $t = $this->mMagicWordsIs + parent
::getMagicWords();
94 function getMessage( $key ) {
95 if( isset( $this->mMessagesIs
[$key] ) ) {
96 return $this->mMessagesIs
[$key];
98 return parent
::getMessage( $key );
102 function getAllMessages() {
103 return $this->mMessagesIs
;
106 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 separatorTransformTable() {
162 return array(',' => '.', '.' => ',' );
165 function linkPrefixExtension() {
166 // return '/^(.*?)([áÁðÐéÉíÍóÓúÚýÝþÞæÆöÖA-Za-z-–]+)$/sDu';
170 function linkTrail() {
171 return '/^([áðéíóúýþæöa-z-–]+)(.*)$/sDu';