Bug 6031 (feature request for __NOGALLERY__ on category pages) fixed
[lhc/web/wiklou.git] / languages / LanguageFy.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Language
5 */
6
7 require_once( "LanguageUtf8.php" );
8
9 /* private */ $wgNamespaceNamesFy = array(
10 NS_MEDIA => "Media",
11 NS_SPECIAL => "Wiki",
12 NS_MAIN => "",
13 NS_TALK => "Oerlis",
14 NS_USER => "Meidogger",
15 NS_USER_TALK => "Meidogger_oerlis",
16 NS_PROJECT => $wgMetaNamespace,
17 NS_PROJECT_TALK => $wgMetaNamespace . "_oerlis",
18 NS_IMAGE => "Ofbyld",
19 NS_IMAGE_TALK => "Ofbyld_oerlis",
20 NS_MEDIAWIKI => "MediaWiki",
21 NS_MEDIAWIKI_TALK => "MediaWiki_oerlis",
22 NS_TEMPLATE => "Berjocht",
23 NS_TEMPLATE_TALK => "Berjocht_oerlis",
24 NS_HELP => "Hulp",
25 NS_HELP_TALK => "Hulp_oerlis",
26 NS_CATEGORY => "Kategory",
27 NS_CATEGORY_TALK => "Kategory_oerlis"
28 ) + $wgNamespaceNamesEn;
29
30 /* private */ $wgQuickbarSettingsFy = array(
31 "Ut", "Lofts fêst", "Rjochts fêst", "Lofts sweevjend"
32 );
33
34 /* private */ $wgSkinNamesFy = array(
35 'standard' => "Standert",
36 'nostalgia' => "Nostalgy",
37 ) + $wgSkinNamesEn;
38
39
40 /* private */ $wgDateFormatsFy = array(
41 'Gjin foarkar',
42 '16.12, jan 15, 2001',
43 '16.12, 15 jan 2001',
44 '16.12, 2001 jan 15',
45 'ISO 8601' => '2001-01-15 16:12:34'
46 );
47
48 /* private */ $wgBookstoreListFy = array(
49 );
50
51 if (!$wgCachedMessageArrays) {
52 require_once('MessagesFy.php');
53 }
54
55 class LanguageFy extends LanguageUtf8 {
56
57 function getBookstoreList () {
58 global $wgBookstoreListFy ;
59 return $wgBookstoreListFy ;
60 }
61
62 function getNamespaces() {
63 global $wgNamespaceNamesFy;
64 return $wgNamespaceNamesFy;
65 }
66
67
68 function getNsIndex( $text ) {
69 global $wgNamespaceNamesFy;
70
71 foreach ( $wgNamespaceNamesFy as $i => $n ) {
72 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
73 }
74 if ( 0 == strcasecmp( "Brûker", $text ) ) return 2;
75 if ( 0 == strcasecmp( "Brûker_oerlis", $text ) ) return 3;
76 return false;
77 }
78
79
80 function getQuickbarSettings() {
81 global $wgQuickbarSettingsFy;
82 return $wgQuickbarSettingsFy;
83 }
84
85 function getSkinNames() {
86 global $wgSkinNamesFy;
87 return $wgSkinNamesFy;
88 }
89
90 function separatorTransformTable() {
91 return array(',' => '.', '.' => ',' );
92 }
93
94 function getDateFormats() {
95 global $wgDateFormatsFy;
96 return $wgDateFormatsFy;
97 }
98
99 /**
100 * @access public
101 * @param mixed $ts the time format which needs to be turned into a
102 * date('YmdHis') format with wfTimestamp(TS_MW,$ts)
103 * @param bool $adj whether to adjust the time output according to the
104 * user configured offset ($timecorrection)
105 * @param bool $format true to use user's date format preference
106 * @param string $timecorrection the time offset as returned by
107 * validateTimeZone() in Special:Preferences
108 * @return string
109 */
110 function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
111
112 if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
113
114 $datePreference = $this->dateFormat( $format );
115
116 $month = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) );
117 $day = 0 + substr( $ts, 6, 2 );
118 $year = substr( $ts, 0, 4 );
119
120 switch( $datePreference ) {
121 case MW_DATE_DMY: return "$day $month $year";
122 case MW_DATE_YMD: return "$year $month $day";
123 case MW_DATE_ISO: return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
124 default: return "$month $day, $year";
125 }
126 }
127
128 /**
129 * @access public
130 * @param mixed $ts the time format which needs to be turned into a
131 * date('YmdHis') format with wfTimestamp(TS_MW,$ts)
132 * @param bool $adj whether to adjust the time output according to the
133 * user configured offset ($timecorrection)
134 * @param bool $format true to use user's date format preference
135 * @param string $timecorrection the time offset as returned by
136 * validateTimeZone() in Special:Preferences
137 * @return string
138 */
139 function time( $ts, $adj = false, $format = true, $timecorrection = false ) {
140 global $wgUser;
141
142 if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
143 $datePreference = $this->dateFormat( $format );
144
145 if ( $datePreference == MW_DATE_ISO ) {
146 $sep = ':';
147 } else {
148 $sep = '.';
149 }
150
151 $t = substr( $ts, 8, 2 ) . $sep . substr( $ts, 10, 2 );
152
153 if ( $datePreference == MW_DATE_ISO ) {
154 $t .= $sep . substr( $ts, 12, 2 );
155 }
156 return $t;
157 }
158
159 function getMessage( $key ) {
160 global $wgAllMessagesFy;
161 if( isset( $wgAllMessagesFy[$key] ) ) {
162 return $wgAllMessagesFy[$key];
163 } else {
164 return parent::getMessage( $key );
165 }
166 }
167 }
168
169 ?>