9 require_once( "LanguageUtf8.php" );
11 if (!$wgCachedMessageArrays) {
12 require_once('MessagesWa.php');
15 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
18 define( 'MW_DATE_WLN_LONG', MW_DATE_DMY
);
19 define( 'MW_DATE_WLN_SHORT', '4' );
21 class LanguageWa
extends LanguageUtf8
{
22 private $mMessagesWa, $mNamespaceNamesWa = null;
24 private $mQuickbarSettingsWa = array(
25 "Nole bår", "Aclawêye a hintche", "Aclawêye a droete", "Flotante a hintche", "Flotante a droete"
28 # lists "no preferences", normall (long) walloon date,
29 # short walloon date, and ISO format
30 # MW_DATE_DMY is alias for long format, as it is dd mmmmm yyyy.
31 # "4" is chosen as value for short format, as it is used in LanguageVi.php
32 private $mDateFormatsWa = array(
33 MW_DATE_DEFAULT
=> 'Nole preferince',
34 #MW_DATE_DMY => '16:12, 15 January 2001',
35 #MW_DATE_MDY => '16:12, January 15, 2001',
36 #MW_DATE_YMD => '16:12, 2001 January 15',
37 MW_DATE_WLN_LONG
=> '15 di djanvî 2001 a 16:12',
38 MW_DATE_WLN_SHORT
=> '15/01/2001 a 16:12',
39 MW_DATE_ISO
=> '2001-01-15 16:12:34',
44 function __construct() {
45 parent
::__construct();
47 global $wgAllMessagesWa;
48 $this->mMessagesWa
=& $wgAllMessagesWa;
50 global $wgMetaNamespace;
51 $this->mNamespaceNamesWa
= array(
52 NS_MEDIA
=> "Media", /* Media */
53 NS_SPECIAL
=> "Sipeciås", /* Special */
55 NS_TALK
=> "Copene", /* Talk */
56 NS_USER
=> "Uzeu", /* User */
57 NS_USER_TALK
=> "Uzeu_copene", /* User_talk */
58 NS_PROJECT
=> $wgMetaNamespace,
59 NS_PROJECT_TALK
=> $wgMetaNamespace . "_copene",
60 NS_IMAGE
=> "Imådje", /* Image */
61 NS_IMAGE_TALK
=> "Imådje_copene", /* Image_talk */
62 NS_MEDIAWIKI
=> "MediaWiki", /* MediaWiki */
63 NS_MEDIAWIKI_TALK
=> "MediaWiki_copene", /* MediaWiki_talk */
64 NS_TEMPLATE
=> "Modele",
65 NS_TEMPLATE_TALK
=> "Modele_copene",
67 NS_HELP_TALK
=> "Aidance_copene",
68 NS_CATEGORY
=> "Categoreye",
69 NS_CATEGORY_TALK
=> "Categoreye_copene",
73 function getNamespaces() {
74 return $this->mNamespaceNamesWa + parent
::getNamespaces();
77 function getQuickbarSettings() {
78 return $this->mQuickbarSettingsWa
;
81 function getDateFormats() {
82 return $this->mDateFormatsWa
;
85 function getMessage( $key ) {
86 if( isset( $this->mMessagesWa
[$key] ) ) {
87 return $this->mMessagesWa
[$key];
89 return parent
::getMessage( $key );
93 function getAllMessages() {
94 return $this->mMessagesWa
;
98 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month,
99 ### "<day> di <monthname>" for months starting by a consoun, and
100 ### "<day> d' <monthname>" for months starting with a vowel
102 function date( $ts, $adj = false, $format = true, $tc = false ) {
105 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
106 $datePreference = $this->dateFormat( $format );
108 # ISO (YYYY-mm-dd) format
110 # we also output this format for YMD (eg: 2001 January 15)
111 if ( $datePreference == MW_DATE_ISO ||
112 $datePreference == MW_DATE_YMD
) {
113 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
118 if ( $datePreference == MW_DATE_WLN_SHORT
) {
119 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4);
125 # we output this in all other cases
126 $m = substr( $ts, 4, 2 );
127 $n = substr( $ts, 6, 2 );
129 $d = "1î d' " . $this->getMonthName( $m ) .
130 " " . substr( $ts, 0, 4 );
131 } else if ($n == 2 ||
$n == 3 ||
$n == 20 ||
$n == 22 ||
$n == 23) {
132 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
133 " " . substr( $ts, 0, 4 );
134 } else if ($m == 4 ||
$m == 8 ||
$m == 10) {
135 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
136 " " . substr( $ts, 0, 4 );
138 $d = (0 +
$n) . " di " . $this->getMonthName( $m ) .
139 " " . substr( $ts, 0, 4 );
144 function timeBeforeDate( ) {
148 function timeDateSeparator( $format ) {
152 # definixha del cogne po les limeros
153 # (number format definition)
154 # en: 12,345.67 -> wa: 12 345,67
155 function separatorTransformTable() {
156 return array(',' => "\xc2\xa0", '.' => ',' );
159 function linkTrail() {
160 return '/^([a-zåâêîôûçéè]+)(.*)$/sDu';