summaryrefslogtreecommitdiff
path: root/languages/LanguageBr.php
blob: 30939866e19398e991a4dffdac358ccb916967ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
/**
  * @package MediaWiki
  * @subpackage Language
  */

require_once( 'LanguageUtf8.php' );

/* private */ $wgNamespaceNamesBr = array(
	NS_MEDIA			=> 'Media',
	NS_SPECIAL			=> 'Dibar',
	NS_MAIN				=> '',
	NS_TALK				=> 'Kaozeal',
	NS_USER				=> 'Implijer',
	NS_USER_TALK		=> 'Kaozeadenn_Implijer',
	NS_PROJECT			=> $wgMetaNamespace,
	NS_PROJECT_TALK		=> 'Kaozeadenn_'.$wgMetaNamespace,
	NS_IMAGE			=> 'Skeudenn',
	NS_IMAGE_TALK		=> 'Kaozeadenn_Skeudenn',
	NS_MEDIAWIKI		=> 'MediaWiki',
	NS_MEDIAWIKI_TALK	=> 'Kaozeadenn_MediaWiki',
	NS_TEMPLATE			=> 'Patrom',
	NS_TEMPLATE_TALK	=> 'Kaozeadenn_Patrom',
	NS_HELP				=> 'Skoazell',
	NS_HELP_TALK		=> 'Kaozeadenn_Skoazell',
	NS_CATEGORY			=> 'Rummad',
	NS_CATEGORY_TALK	=> 'Kaozeadenn_Rummad'
) + $wgNamespaceNamesEn;

/* private */ $wgQuickbarSettingsBr = array(
	'Hini ebet', 'Kleiz', 'Dehou', 'War-neuñv a-gleiz'
);

/* private */ $wgSkinNamesBr = array(
	'standard'		=> 'Standard',
	'nostalgia'		=> 'Melkoni',
	'cologneblue'	=> 'Glaz Kologn',
	'smarty'		=> 'Paddington',
	'montparnasse'	=> 'Montparnasse',
	'davinci'		=> 'DaVinci',
	'mono'			=> 'Mono',
	'monobook'		=> 'MonoBook',
	'myskin'		=> 'MySkin'
);



/* private */ $wgBookstoreListBr = array(
	'Amazon.fr'		=> 'http://www.amazon.fr/exec/obidos/ISBN=$1',
	'alapage.fr'	=> 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
	'fnac.com'		=> 'http://www3.fnac.com/advanced/book.do?isbn=$1',
	'chapitre.com'	=> 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
);

if (!$wgCachedMessageArrays) {
	require_once('MessagesBr.php');
}

class LanguageBr extends LanguageUtf8 {

	function getBookstoreList () {
		global $wgBookstoreListBr ;
		return $wgBookstoreListBr ;
	}

	function getNamespaces() {
		global $wgNamespaceNamesBr;
		return $wgNamespaceNamesBr;
	}

	function getDateFormats() {
		return false;
	}

	function getNsIndex( $text ) {
		global $wgNamespaceNamesBr, $wgSitename;

		foreach ( $wgNamespaceNamesBr as $i => $n ) {
			if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
		}
		if( $wgSitename == "Wikipedia" ) {
			if( 0 == strcasecmp( "Discussion_Wikipedia", $text ) ) return 5;
		}
		return false;
	}

	function getQuickbarSettings() {
		global $wgQuickbarSettingsBr;
		return $wgQuickbarSettingsBr;
	}

	function getSkinNames() {
		global $wgSkinNamesBr;
		return $wgSkinNamesBr;
	}


	function date( $ts, $adj = false ) {
		if ( $adj ) { $ts = $this->userAdjust( $ts ); }

		$d = (0 + substr( $ts, 6, 2 )) . " " .
		  $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
		  " " . substr( $ts, 0, 4 );
		return $d;
	}

	function timeanddate( $ts, $adj = false ) {
		return $this->date( $ts, $adj ) . " da " . $this->time( $ts, $adj );
	}

	function separatorTransformTable() {
		return array(',' => "\xc2\xa0", '.' => ',' );
	}

	function getMessage( $key ) {
		global $wgAllMessagesBr, $wgAllMessagesEn;
		if( isset( $wgAllMessagesBr[$key] ) ) {
			return $wgAllMessagesBr[$key];
		} else {
			return parent::getMessage( $key );
		}
	}

}

?>