Using __construct for all the language constructors, and few minor fixes.
[lhc/web/wiklou.git] / languages / LanguageCa.php
1 <?php
2 /** Catalan (Català)
3 *
4 * @package MediaWiki
5 * @subpackage Language
6 */
7
8 require_once( 'LanguageUtf8.php' );
9
10 if (!$wgCachedMessageArrays) {
11 require_once('MessagesCa.php');
12 }
13
14 class LanguageCa extends LanguageUtf8 {
15 private $mMessagesCa, $mNamespaceNamesCa = null;
16
17 private $mQuickbarSettingsCa = array(
18 "Cap", "Fixa a la dreta", "Fixa a l'esquerra", "Surant a l'esquerra"
19 );
20
21 private $mSkinNamesCa = array(
22 'standard' => "Estàndard",
23 'nostalgia' => "Nostàlgia",
24 'cologneblue' => "Colònia blava",
25 );
26
27 private $mBookstoreListCa = array(
28 'Catàleg Col·lectiu de les Universitats de Catalunya' => 'http://ccuc.cbuc.es/cgi-bin/vtls.web.gateway?searchtype=control+numcard&searcharg=$1',
29 'Totselsllibres.com' => 'http://www.totselsllibres.com/tel/publi/busquedaAvanzadaLibros.do?ISBN=$1',
30 );
31
32 function __construct() {
33 parent::__construct();
34
35 global $wgAllMessagesCa;
36 $this->mMessagesCa =& $wgAllMessagesCa;
37
38 global $wgMetaNamespace;
39 $this->mNamespaceNamesCa = array(
40 NS_MEDIA => 'Media',
41 NS_SPECIAL => 'Especial',
42 NS_MAIN => '',
43 NS_TALK => 'Discussió',
44 NS_USER => 'Usuari',
45 NS_USER_TALK => 'Usuari_Discussió',
46 NS_PROJECT => $wgMetaNamespace,
47 NS_PROJECT_TALK => $wgMetaNamespace.'_Discussió',
48 NS_IMAGE => 'Imatge',
49 NS_IMAGE_TALK => 'Imatge_Discussió',
50 NS_MEDIAWIKI => 'MediaWiki',
51 NS_MEDIAWIKI_TALK => 'MediaWiki_Discussió',
52 NS_TEMPLATE => 'Plantilla',
53 NS_TEMPLATE_TALK => 'Plantilla_Discussió',
54 NS_HELP => 'Ajuda',
55 NS_HELP_TALK => 'Ajuda_Discussió',
56 NS_CATEGORY => 'Categoria',
57 NS_CATEGORY_TALK => 'Categoria_Discussió'
58 );
59 }
60
61 function getNamespaces() {
62 return $this->mNamespaceNamesCa + parent::getNamespaces();
63 }
64
65 function getQuickbarSettings() {
66 return $this->mQuickbarSettingsCa;
67 }
68
69 function getSkinNames() {
70 return $this->mSkinNamesCa + parent::getSkinNames();
71 }
72
73 function getBookstoreList () {
74 return $this->mBookstoreListCa + parent::getBookstoreList();
75 }
76
77 function getMessage( $key ) {
78 if( isset( $this->mMessagesCa[$key] ) ) {
79 return $this->mMessagesCa[$key];
80 } else {
81 return parent::getMessage( $key );
82 }
83 }
84
85 function getAllMessages() {
86 return $this->mMessagesCa;
87 }
88
89 function formatMonth( $month, $format ) {
90 return $this->getMonthAbbreviation( $month );
91 }
92
93 function separatorTransformTable() {
94 return array(',' => '.', '.' => ',' );
95 }
96
97 function linkTrail() {
98 return '/^([a-zàèéíòóúç·ïü\']+)(.*)$/sDu';
99 }
100
101 }
102
103 ?>