summaryrefslogtreecommitdiff
path: root/languages/LanguageFr.php
blob: b9c262a6b348cb324864f4a1332f060bac2f8fd4 (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
<?php
/** French (Français)
 *
 * @package MediaWiki
 * @subpackage Language
 *
 */

require_once( 'LanguageUtf8.php' );

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

class LanguageFr extends LanguageUtf8 {
	private $mMessagesFr, $mNamespaceNamesFr = null;

	private $mQuickbarSettingsFr = array(
		'Aucune', 'Gauche', 'Droite', 'Flottante à gauche'
	);
	
	private $mSkinNamesFr = array(
		'standard'  => 'Standard',
		'nostalgia' => 'Nostalgie',
	);
	
	private $mBookstoreListFr = 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',
	);

	function __construct() {
		parent::__construct();

		global $wgAllMessagesFr;
		$this->mMessagesFr =& $wgAllMessagesFr;

		global $wgMetaNamespace;
		$this->mNamespaceNamesFr = array(
			NS_MEDIA          => 'Media',
			NS_SPECIAL        => 'Special',
			NS_MAIN           => '',
			NS_TALK           => 'Discuter',
			NS_USER           => 'Utilisateur',
			NS_USER_TALK      => 'Discussion_Utilisateur',
			NS_PROJECT        => $wgMetaNamespace,
			NS_PROJECT_TALK   => 'Discussion_' . $wgMetaNamespace,
			NS_IMAGE          => 'Image',
			NS_IMAGE_TALK     => 'Discussion_Image',
			NS_MEDIAWIKI      => 'MediaWiki',
			NS_MEDIAWIKI_TALK => 'Discussion_MediaWiki',
			NS_TEMPLATE       => 'Modèle',
			NS_TEMPLATE_TALK  => 'Discussion_Modèle',
			NS_HELP           => 'Aide',
			NS_HELP_TALK      => 'Discussion_Aide',
			NS_CATEGORY       => 'Catégorie',
			NS_CATEGORY_TALK  => 'Discussion_Catégorie'
		);

	}

	function getNamespaces() {
		return $this->mNamespaceNamesFr + parent::getNamespaces();
	}

	function getQuickbarSettings() {
		return $this->mQuickbarSettingsFr;
	}

	function getSkinNames() {
		return $this->mSkinNamesFr + parent::getSkinNames();
	}

	function getBookstoreList() {
		return $this->mBookstoreListFr;
	}

	function getMessage( $key ) {
		if( isset( $this->mMessagesFr[$key] ) ) {
			return $this->mMessagesFr[$key];
		} else {
			return parent::getMessage( $key );
		}
	}

	function getAllMessages() {
		return $this->mMessagesFr;
	}

	function getNsIndex( $text ) {
		global $wgSitename;

		foreach ( $this->mNamespaceNamesFr as $i => $n ) {
			if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
		}
		if( $wgSitename == 'Wikipédia' ) {
			if( 0 == strcasecmp( 'Wikipedia', $text ) ) return NS_PROJECT;
			if( 0 == strcasecmp( 'Discussion_Wikipedia', $text ) ) return NS_PROJECT_TALK;
		}
		return false;
	}

	function timeBeforeDate( $format ) {
		return false;
	}

	function timeDateSeparator( $format ) {
		return " à ";
	}

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

}

?>