Update, and making 'ipboptions' compatible to English.
[lhc/web/wiklou.git] / languages / LanguageSv.php
1 <?php
2 /**
3 * Swedish (Svenska)
4 *
5 * @package MediaWiki
6 * @subpackage Language
7 */
8
9 require_once( "LanguageUtf8.php" );
10
11 if (!$wgCachedMessageArrays) {
12 require_once('MessagesSv.php');
13 }
14
15 class LanguageSv extends LanguageUtf8 {
16 private $mMessagesSv, $mNamespaceNamesSv;
17
18 private $mQuickbarSettingsSv = array(
19 "Ingen",
20 "Fast vänster",
21 "Fast höger",
22 "Flytande vänster"
23 );
24
25 private $mSkinNamesSv = array(
26 'standard' => "Standard",
27 'nostalgia' => "Nostalgi",
28 'cologneblue' => "Cologne Blå",
29 );
30
31 function __construct() {
32 parent::__construct();
33
34 global $wgAllMessagesSv;
35 $this->mMessagesSv =& $wgAllMessagesSv;
36
37 global $wgMetaNamespace;
38 $this->mNamespaceNamesSv = array(
39 NS_MEDIA => "Media",
40 NS_SPECIAL => "Special",
41 NS_MAIN => "",
42 NS_TALK => "Diskussion",
43 NS_USER => "Användare",
44 NS_USER_TALK => "Användardiskussion",
45 NS_PROJECT => $wgMetaNamespace,
46 NS_PROJECT_TALK => $wgMetaNamespace . "diskussion",
47 NS_IMAGE => "Bild",
48 NS_IMAGE_TALK => "Bilddiskussion",
49 NS_MEDIAWIKI => "MediaWiki",
50 NS_MEDIAWIKI_TALK => "MediaWiki_diskussion",
51 NS_TEMPLATE => "Mall",
52 NS_TEMPLATE_TALK => "Malldiskussion",
53 NS_HELP => "Hjälp",
54 NS_HELP_TALK => "Hjälp_diskussion",
55 NS_CATEGORY => "Kategori",
56 NS_CATEGORY_TALK => "Kategoridiskussion"
57 );
58 }
59
60 function getNamespaces() {
61 return $this->mNamespaceNamesSv + parent::getNamespaces();
62 }
63
64 function getQuickbarSettings() {
65 return $this->mQuickbarSettingsSv;
66 }
67
68 function getSkinNames() {
69 return $this->mSkinNamesSv + parent::getSkinNames();
70 }
71
72 function getMessage( $key ) {
73 if( isset( $this->mMessagesSv[$key] ) ) {
74 return $this->mMessagesSv[$key];
75 } else {
76 return parent::getMessage( $key );
77 }
78 }
79
80 function getAllMessages() {
81 return $this->mMessagesSv;
82 }
83
84 function linkTrail() {
85 return '/^([a-zåäöéÅÄÖÉ]+)(.*)$/sDu';
86 }
87
88
89 function separatorTransformTable() {
90 return array(
91 ',' => "\xc2\xa0", // @bug 2749
92 '.' => ','
93 );
94 }
95
96 // "." is used as the character to separate the
97 // hours from the minutes in the date output
98 function timeSeparator( $format ) {
99 return '.';
100 }
101
102 function timeanddate( $ts, $adj = false, $format = false, $timecorrection = false ) {
103 $format = $this->dateFormat( $format );
104 if( $format == MW_DATE_ISO ) {
105 return parent::timeanddate( $ts, $adj, $format, $timecorrection );
106 } else {
107 return $this->date( $ts, $adj, $format, $timecorrection ) .
108 " kl." .
109 $this->time( $ts, $adj, $format, $timecorrection );
110 }
111 }
112
113 }
114 ?>