8 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
11 class LanguageWa
extends Language
{
13 * Use singular form for zero
15 function convertPlural( $count, $forms ) {
16 if ( !count( $forms ) ) { return ''; }
17 $forms = $this->preConvertPlural( $forms, 2 );
19 return ( $count <= 1 ) ?
$forms[0] : $forms[1];
23 ## # Dates in Walloon are "1î d' <monthname>" for 1st of the month,
24 ## # "<day> di <monthname>" for months starting by a consoun, and
25 ## # "<day> d' <monthname>" for months starting with a vowel
27 function date( $ts, $adj = false, $format = true, $tc = false ) {
28 $ts = wfTimestamp( TS_MW
, $ts );
29 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
30 $datePreference = $this->dateFormat( $format );
32 # ISO (YYYY-mm-dd) format
34 # we also output this format for YMD (eg: 2001 January 15)
35 if ( $datePreference == 'ISO 8601' ) {
36 $d = substr( $ts, 0, 4 ) . '-' . substr( $ts, 4, 2 ) . '-' . substr( $ts, 6, 2 );
41 if ( $datePreference == 'walloon short' ) {
42 $d = substr( $ts, 6, 2 ) . '/' . substr( $ts, 4, 2 ) . '/' . substr( $ts, 0, 4 );
48 # we output this in all other cases
49 $m = substr( $ts, 4, 2 );
50 $n = substr( $ts, 6, 2 );
52 $d = "1î d' " . $this->getMonthName( $m ) .
53 " " . substr( $ts, 0, 4 );
54 } else if ( $n == 2 ||
$n == 3 ||
$n == 20 ||
$n == 22 ||
$n == 23 ) {
55 $d = ( 0 +
$n ) . " d' " . $this->getMonthName( $m ) .
56 " " . substr( $ts, 0, 4 );
57 } else if ( $m == 4 ||
$m == 8 ||
$m == 10 ) {
58 $d = ( 0 +
$n ) . " d' " . $this->getMonthName( $m ) .
59 " " . substr( $ts, 0, 4 );
61 $d = ( 0 +
$n ) . " di " . $this->getMonthName( $m ) .
62 " " . substr( $ts, 0, 4 );
67 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
68 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
69 $datePreference = $this->dateFormat( $format );
70 if ( $datePreference == 'ISO 8601' ) {
71 return parent
::timeanddate( $ts, $adj, $format, $tc );
73 return $this->date( $ts, $adj, $format, $tc ) . ' a ' .
74 $this->time( $ts, $adj, $format, $tc );