Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexi...
[lhc/web/wiklou.git] / languages / LanguageSr_ec.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Language
5 */
6
7 require_once( "LanguageUtf8.php" );
8
9 /* private */ $wgNamespaceNamesSr_ec = array(
10 NS_MEDIA => "Медија",
11 NS_SPECIAL => "Посебно",
12 NS_MAIN => "",
13 NS_TALK => "Разговор",
14 NS_USER => "Корисник",
15 NS_USER_TALK => "Разговор_са_корисником",
16 NS_PROJECT => $wgMetaNamespace,
17 NS_PROJECT_TALK => ($wgMetaNamespaceTalk ? $wgMetaNamespaceTalk : "Разговор_о_".$wgMetaNamespace ),
18 NS_IMAGE => "Слика",
19 NS_IMAGE_TALK => "Разговор_о_слици",
20 NS_MEDIAWIKI => "МедијаВики",
21 NS_MEDIAWIKI_TALK => "Разговор_о_МедијаВикију",
22 NS_TEMPLATE => 'Шаблон',
23 NS_TEMPLATE_TALK => 'Разговор_о_шаблону',
24 NS_HELP => 'Помоћ',
25 NS_HELP_TALK => 'Разговор_о_помоћи',
26 NS_CATEGORY => 'Категорија',
27 NS_CATEGORY_TALK => 'Разговор_о_категорији',
28 ) + $wgNamespaceNamesEn;
29
30 /* private */ $wgQuickbarSettingsSr_ec = array(
31 "Никаква", "Причвршћена лево", "Причвршћена десно", "Плутајућа лево"
32 );
33
34 /* private */ $wgSkinNamesSr_ec = array(
35 "Обична", "Носталгија", "Келнско плаво", "Педингтон", "Монпарнас"
36 ) + $wgSkinNamesEn;
37
38 /* private */ $wgUserTogglesSr_ec = array(
39 'nolangconversion',
40 ) + $wgUserTogglesEn;
41
42 /* private */ $wgDateFormatsSr_ec = array(
43 'Није битно',
44 '06:12, 5. јануар 2001.',
45 '06:12, 5 јануар 2001',
46 '06:12, 05.01.2001.',
47 '06:12, 5.1.2001.',
48 '06:12, 5. јан 2001.',
49 '06:12, 5 јан 2001',
50 '6:12, 5. јануар 2001.',
51 '6:12, 5 јануар 2001',
52 '6:12, 05.01.2001.',
53 '6:12, 5.1.2001.',
54 '6:12, 5. јан 2001.',
55 '6:12, 5 јан 2001',
56 );
57
58 /* NOT USED IN STABLE VERSION */
59 /* private */ $wgMagicWordsSr_ec = array(
60 # ID CASE SYNONYMS
61 'redirect' => array( 0, '#Преусмери', '#redirect', '#преусмери', '#ПРЕУСМЕРИ' ),
62 'notoc' => array( 0, '__NOTOC__', '__БЕЗСАДРЖАЈА__' ),
63 'forcetoc' => array( 0, '__FORCETOC__', '__ФОРСИРАНИСАДРЖАЈ__' ),
64 'toc' => array( 0, '__TOC__', '__САДРЖАЈ__' ),
65 'noeditsection' => array( 0, '__NOEDITSECTION__', '__БЕЗ_ИЗМЕНА__', '__БЕЗИЗМЕНА__' ),
66 'start' => array( 0, '__START__', '__ПОЧЕТАК__' ),
67 'end' => array( 0, '__END__', '__КРАЈ__' ),
68 'currentmonth' => array( 1, 'CURRENTMONTH', 'ТРЕНУТНИМЕСЕЦ' ),
69 'currentmonthname' => array( 1, 'CURRENTMONTHNAME', 'ТРЕНУТНИМЕСЕЦИМЕ' ),
70 'currentmonthnamegen' => array( 1, 'CURRENTMONTHNAMEGEN', 'ТРЕНУТНИМЕСЕЦРОД' ),
71 'currentmonthabbrev' => array( 1, 'CURRENTMONTHABBREV', 'ТРЕНУТНИМЕСЕЦСКР' ),
72 'currentday' => array( 1, 'CURRENTDAY', 'ТРЕНУТНИДАН' ),
73 'currentdayname' => array( 1, 'CURRENTDAYNAME', 'ТРЕНУТНИДАНИМЕ' ),
74 'currentyear' => array( 1, 'CURRENTYEAR', 'ТРЕНУТНАГОДИНА' ),
75 'currenttime' => array( 1, 'CURRENTTIME', 'ТРЕНУТНОВРЕМЕ' ),
76 'numberofarticles' => array( 1, 'NUMBEROFARTICLES', 'БРОЈЧЛАНАКА' ),
77 'numberoffiles' => array( 1, 'NUMBEROFFILES', 'БРОЈДАТОТЕКА', 'БРОЈФАЈЛОВА' ),
78 'pagename' => array( 1, 'PAGENAME', 'СТРАНИЦА' ),
79 'pagenamee' => array( 1, 'PAGENAMEE', 'СТРАНИЦЕ' ),
80 'namespace' => array( 1, 'NAMESPACE', 'ИМЕНСКИПРОСТОР' ),
81 'namespacee' => array( 1, 'NAMESPACEE', 'ИМЕНСКИПРОСТОРИ' ),
82 'fullpagename' => array( 1, 'FULLPAGENAME', 'ПУНОИМЕСТРАНЕ' ),
83 'fullpagenamee' => array( 1, 'FULLPAGENAMEE', 'ПУНОИМЕСТРАНЕЕ' ),
84 'msg' => array( 0, 'MSG:', 'ПОР:' ),
85 'subst' => array( 0, 'SUBST:', 'ЗАМЕНИ:' ),
86 'msgnw' => array( 0, 'MSGNW:', 'НВПОР:' ),
87 'img_thumbnail' => array( 1, 'thumbnail', 'thumb', 'мини' ),
88 'img_manualthumb' => array( 1, 'thumbnail=$1', 'thumb=$1', 'мини=$1' ),
89 'img_right' => array( 1, 'right', 'десно', 'д' ),
90 'img_left' => array( 1, 'left', 'лево', 'л' ),
91 'img_none' => array( 1, 'none', 'н', 'без' ),
92 'img_width' => array( 1, '$1px', '$1пискел' , '$1п' ),
93 'img_center' => array( 1, 'center', 'centre', 'центар', 'ц' ),
94 'img_framed' => array( 1, 'framed', 'enframed', 'frame', 'оквир', 'рам' ),
95 'int' => array( 0, 'INT:', 'ИНТ:' ),
96 'sitename' => array( 1, 'SITENAME', 'ИМЕСАЈТА' ),
97 'ns' => array( 0, 'NS:', 'ИП:' ),
98 'localurl' => array( 0, 'LOCALURL:', 'ЛОКАЛНААДРЕСА:' ),
99 'localurle' => array( 0, 'LOCALURLE:', 'ЛОКАЛНЕАДРЕСЕ:' ),
100 'server' => array( 0, 'SERVER', 'СЕРВЕР' ),
101 'servername' => array( 0, 'SERVERNAME', 'ИМЕСЕРВЕРА' ),
102 'scriptpath' => array( 0, 'SCRIPTPATH', 'СКРИПТА' ),
103 'grammar' => array( 0, 'GRAMMAR:', 'ГРАМАТИКА:' ),
104 'notitleconvert' => array( 0, '__NOTITLECONVERT__', '__NOTC__', '__БЕЗТЦ__' ),
105 'nocontentconvert' => array( 0, '__NOCONTENTCONVERT__', '__NOCC__', '__БЕЗЦЦ__' ),
106 'currentweek' => array( 1, 'CURRENTWEEK', 'ТРЕНУТНАНЕДЕЉА' ),
107 'currentdow' => array( 1, 'CURRENTDOW', 'ТРЕНУТНИДОВ' ),
108 'revisionid' => array( 1, 'REVISIONID', 'ИДРЕВИЗИЈЕ' ),
109 'plural' => array( 0, 'PLURAL:', 'МНОЖИНА:' ),
110 'fullurl' => array( 0, 'FULLURL:', 'ПУНУРЛ:' ),
111 'fullurle' => array( 0, 'FULLURLE:', 'ПУНУРЛЕ:' ),
112 'lcfirst' => array( 0, 'LCFIRST:', 'ЛЦПРВИ:' ),
113 'ucfirst' => array( 0, 'UCFIRST:', 'УЦПРВИ:' ),
114 'lc' => array( 0, 'LC:', 'ЛЦ:' ),
115 'uc' => array( 0, 'UC:', 'УЦ:' ),
116 );
117
118 if (!$wgCachedMessageArrays) {
119 require_once('MessagesSr_ec.php');
120 }
121
122 #--------------------------------------------------------------------------
123 # Internationalisation code
124 #--------------------------------------------------------------------------
125
126 class LanguageSr_ec extends LanguageUtf8 {
127
128 function getNamespaces() {
129 global $wgNamespaceNamesSr_ec;
130 return $wgNamespaceNamesSr_ec;
131 }
132
133 function getQuickbarSettings() {
134 global $wgQuickbarSettingsSr_ec;
135 return $wgQuickbarSettingsSr_ec;
136 }
137
138 function getSkinNames() {
139 global $wgSkinNamesSr_ec;
140 return $wgSkinNamesSr_ec;
141 }
142
143 function getDateFormats() {
144 global $wgDateFormatsSr_ec;
145 return $wgDateFormatsSr_ec;
146 }
147
148 function getMessage( $key ) {
149 global $wgAllMessagesSr_ec;
150 if(array_key_exists($key, $wgAllMessagesSr_ec))
151 return $wgAllMessagesSr_ec[$key];
152 else
153 return parent::getMessage($key);
154 }
155
156 /**
157 * Exports $wgMagicWordsSr_ec
158 * @return array
159 */
160 function &getMagicWords() {
161 global $wgMagicWordsSr_ec;
162 return $wgMagicWordsSr_ec;
163 }
164
165 function separatorTransformTable() {
166 return array(',' => '.', '.' => ',' );
167 }
168
169 /**
170 * @access public
171 * @param mixed $ts the time format which needs to be turned into a
172 * date('YmdHis') format with wfTimestamp(TS_MW,$ts)
173 * @param bool $adj whether to adjust the time output according to the
174 * user configured offset ($timecorrection)
175 * @param mixed $format what format to return, if it's false output the
176 * default one.
177 * @param string $timecorrection the time offset as returned by
178 * validateTimeZone() in Special:Preferences
179 * @return string
180 */
181 function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
182
183 if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
184
185 $mm = substr( $ts, 4, 2 );
186 $m = 0 + $mm;
187 $mmmm = $this->getMonthName( $mm );
188 $mmm = $this->getMonthAbbreviation( $mm );
189 $dd = substr( $ts, 6, 2 );
190 $d = 0 + $dd;
191 $yyyy = substr( $ts, 0, 4 );
192 $yy = substr( $ts, 2, 2 );
193
194 switch( $format ) {
195 case '2':
196 case '8':
197 return "$d $mmmm $yyyy";
198 case '3':
199 case '9':
200 return "$dd.$mm.$yyyy.";
201 case '4':
202 case '10':
203 return "$d.$m.$yyyy.";
204 case '5':
205 case '11':
206 return "$d. $mmm $yyyy.";
207 case '6':
208 case '12':
209 return "$d $mmm $yyyy";
210 default:
211 return "$d. $mmmm $yyyy.";
212 }
213
214 }
215
216 /**
217 * @access public
218 * @param mixed $ts the time format which needs to be turned into a
219 * date('YmdHis') format with wfTimestamp(TS_MW,$ts)
220 * @param bool $adj whether to adjust the time output according to the
221 * user configured offset ($timecorrection)
222 * @param mixed $format what format to return, if it's false output the
223 * default one (default true)
224 * @param string $timecorrection the time offset as returned by
225 * validateTimeZone() in Special:Preferences
226 * @return string
227 */
228 function time( $ts, $adj = false, $format = true, $timecorrection = false ) {
229
230 if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
231 $hh = substr( $ts, 8, 2 );
232 $h = 0 + $hh;
233 $mm = substr( $ts, 10, 2 );
234 switch( $format ) {
235 case '7':
236 case '8':
237 case '9':
238 case '10':
239 case '11':
240 case '12':
241 return "$h:$mm";
242 default:
243 return "$hh:$mm";
244 }
245 }
246
247 /**
248 * @access public
249 * @param mixed $ts the time format which needs to be turned into a
250 * date('YmdHis') format with wfTimestamp(TS_MW,$ts)
251 * @param bool $adj whether to adjust the time output according to the
252 * user configured offset ($timecorrection)
253 * @param mixed $format what format to return, if it's false output the
254 * default one (default true)
255 * @param string $timecorrection the time offset as returned by
256 * validateTimeZone() in Special:Preferences
257 * @return string
258 */
259 function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false) {
260 $datePreference = $this->dateFormat($format);
261 return $this->time( $ts, $adj, $datePreference, $timecorrection ) . ', ' . $this->date( $ts, $adj, $datePreference, $timecorrection );
262
263 }
264
265 function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
266 $count = str_replace ('.', '', $count);
267 if ($count > 10 && floor(($count % 100) / 10) == 1) {
268 return $wordform3;
269 } else {
270 switch ($count % 10) {
271 case 1: return $wordform1;
272 case 2:
273 case 3:
274 case 4: return $wordform2;
275 default: return $wordform3;
276 }
277 }
278 }
279
280 }
281 ?>