Update, and making 'ipboptions' compatible to English.
[lhc/web/wiklou.git] / languages / LanguageHr.php
1 <?php
2 /** Croatian (hrvatski)
3 *
4 * @package MediaWiki
5 * @subpackage Language
6 */
7
8 require_once( 'LanguageUtf8.php' );
9
10 if (!$wgCachedMessageArrays) {
11 require_once('MessagesHr.php');
12 }
13
14 class LanguageHr extends LanguageUtf8 {
15 private $mMessagesHr, $mNamespaceNamesHr = null;
16
17 private $mQuickbarSettingsHr = array(
18 'Bez', 'Lijevo nepomično', 'Desno nepomično', 'Lijevo leteće'
19 );
20
21 private $mSkinNamesHr = array(
22 'standard' => 'Standardna',
23 'nostalgia' => 'Nostalgija',
24 'cologneblue' => 'Kölnska plava',
25 'smarty' => 'Paddington',
26 'montparnasse' => 'Montparnasse',
27 'davinci' => 'DaVinci',
28 'mono' => 'Mono',
29 'monobook' => 'MonoBook',
30 'myskin' => 'MySkin',
31 'chick' => 'Chick'
32 );
33
34 function __construct() {
35 parent::__construct();
36
37 global $wgAllMessagesHr;
38 $this->mMessagesHr =& $wgAllMessagesHr;
39
40 global $wgMetaNamespace;
41 $this->mNamespaceNamesHr = array(
42 NS_MEDIA => 'Mediji',
43 NS_SPECIAL => 'Posebno',
44 NS_MAIN => '',
45 NS_TALK => 'Razgovor',
46 NS_USER => 'Suradnik',
47 NS_USER_TALK => 'Razgovor_sa_suradnikom',
48 NS_PROJECT => $wgMetaNamespace,
49 NS_PROJECT_TALK => 'Razgovor_' . $wgMetaNamespace,
50 NS_IMAGE => 'Slika',
51 NS_IMAGE_TALK => 'Razgovor_o_slici',
52 NS_MEDIAWIKI => 'MediaWiki',
53 NS_MEDIAWIKI_TALK => 'MediaWiki_razgovor',
54 NS_TEMPLATE => 'Predložak',
55 NS_TEMPLATE_TALK => 'Razgovor_o_predlošku',
56 NS_HELP => 'Pomoć',
57 NS_HELP_TALK => 'Razgovor_o_pomoći',
58 NS_CATEGORY => 'Kategorija',
59 NS_CATEGORY_TALK => 'Razgovor_o_kategoriji'
60 );
61
62 }
63
64 function getNamespaces() {
65 return $this->mNamespaceNamesHr + parent::getNamespaces();
66 }
67
68 function getQuickbarSettings() {
69 return $this->mQuickbarSettingsHr;
70 }
71
72 function getSkinNames() {
73 return $this->mSkinNamesHr + parent::getSkinNames();
74 }
75
76 function getDateFormats() {
77 return false;
78 }
79
80 function getMessage( $key ) {
81 if( isset( $this->mMessagesHr[$key] ) ) {
82 return $this->mMessagesHr[$key];
83 } else {
84 return parent::getMessage( $key );
85 }
86 }
87
88 function getAllMessages() {
89 return $this->mMessagesHr;
90 }
91
92 function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
93 if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
94
95 $d = (0 + substr( $ts, 6, 2 )) . ". " .
96 $this->getMonthName( substr( $ts, 4, 2 ) ) .
97 " " .
98 substr( $ts, 0, 4 ) . "." ;
99 return $d;
100 }
101
102
103 function separatorTransformTable() {
104 return array(',' => '.', '.' => ',' );
105 }
106
107 function fallback8bitEncoding() {
108 return 'iso-8859-2';
109 }
110
111 function linkTrail() {
112 return '/^([čšžćđßa-z]+)(.*)$/sDu';
113 }
114
115 function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
116 $count = str_replace ('.', '', $count);
117 if ($count > 10 && floor(($count % 100) / 10) == 1) {
118 return $wordform3;
119 } else {
120 switch ($count % 10) {
121 case 1: return $wordform1;
122 case 2:
123 case 3:
124 case 4: return $wordform2;
125 default: return $wordform3;
126 }
127 }
128 }
129
130 }
131
132 ?>