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