summaryrefslogtreecommitdiff
path: root/languages/LanguageFy.php
blob: 84f381d865d2cadb8525521eb9f4e4288563a2e7 (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
<?php
/** Frisian (Frysk)
 *
 * @package MediaWiki
 * @subpackage Language
 *
 * @author Niklas Laxström
 */

require_once( 'LanguageUtf8.php' );

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

class LanguageFy extends LanguageUtf8 {
	private $mMessagesFy, $mNamespaceNamesFy = null;

	private $mQuickbarSettingsFy = array(
		'Ut', 'Lofts fêst', 'Rjochts fêst', 'Lofts sweevjend'
	);
	
	private $mSkinNamesFy = array(
		'standard' => 'Standert',
		'nostalgia' => 'Nostalgy',
	);
		
	private $mDateFormatsFy = array(
		'Gjin foarkar',
		'16.12, jan 15, 2001',
		'16.12, 15 jan 2001',
		'16.12, 2001 jan 15',
		'ISO 8601' => '2001-01-15 16:12:34'
	);

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

		global $wgAllMessagesFy;
		$this->mMessagesFy =& $wgAllMessagesFy;

		global $wgMetaNamespace;
		$this->mNamespaceNamesFy = array(
			NS_MEDIA          => 'Media',
			NS_SPECIAL        => 'Wiki',
			NS_MAIN           => '',
			NS_TALK           => 'Oerlis',
			NS_USER           => 'Meidogger',
			NS_USER_TALK      => 'Meidogger_oerlis',
			NS_PROJECT        => $wgMetaNamespace,
			NS_PROJECT_TALK   => $wgMetaNamespace . '_oerlis',
			NS_IMAGE          => 'Ofbyld',
			NS_IMAGE_TALK     => 'Ofbyld_oerlis',
			NS_MEDIAWIKI      => 'MediaWiki',
			NS_MEDIAWIKI_TALK => 'MediaWiki_oerlis',
			NS_TEMPLATE       => 'Berjocht',
			NS_TEMPLATE_TALK  => 'Berjocht_oerlis',
			NS_HELP           => 'Hulp',
			NS_HELP_TALK      => 'Hulp_oerlis',
			NS_CATEGORY       => 'Kategory',
			NS_CATEGORY_TALK  => 'Kategory_oerlis'
		);

	}

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

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

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

	function getDateFormats() {
		return $this->mDateFormatsFy;
	}

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

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

	function getNsIndex( $text ) {
		foreach ( $this->mNamespaceNamesFy as $i => $n ) {
			if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
		}
		if ( 0 == strcasecmp( "Brûker", $text ) ) return 2;
		if ( 0 == strcasecmp( "Brûker_oerlis", $text ) ) return 3;
		return false;
	}

	function timeSeparator( $format ) {
		return '.';
	}

	function formatMonth( $month, $format ) {
		return $this->getMonthAbbreviation( $month );
	}

	function separatorTransformTable() {
		return array(',' => '.', '.' => ',' );
	}

	function linkTrail() {
		return '/^([a-zàáèéìíòóùúâêîôûäëïöü]+)(.*)$/sDu';
	}

}

?>