00001 <?php 00008 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes 00009 # k' i gn a. 00010 00011 class LanguageWa extends Language { 00015 function convertPlural( $count, $forms ) { 00016 if ( !count($forms) ) { return ''; } 00017 $forms = $this->preConvertPlural( $forms, 2 ); 00018 00019 return ($count <= 1) ? $forms[0] : $forms[1]; 00020 } 00021 00022 ### 00023 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month, 00024 ### "<day> di <monthname>" for months starting by a consoun, and 00025 ### "<day> d' <monthname>" for months starting with a vowel 00026 ### 00027 function date( $ts, $adj = false, $format = true, $tc = false ) { 00028 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); } 00029 $datePreference = $this->dateFormat( $format ); 00030 00031 # ISO (YYYY-mm-dd) format 00032 # 00033 # we also output this format for YMD (eg: 2001 January 15) 00034 if ( $datePreference == 'ISO 8601' ) { 00035 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2); 00036 return $d; 00037 } 00038 00039 # dd/mm/YYYY format 00040 if ( $datePreference == 'walloon short' ) { 00041 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4); 00042 return $d; 00043 } 00044 00045 # Walloon format 00046 # 00047 # we output this in all other cases 00048 $m = substr( $ts, 4, 2 ); 00049 $n = substr( $ts, 6, 2 ); 00050 if ($n == 1) { 00051 $d = "1î d' " . $this->getMonthName( $m ) . 00052 " " . substr( $ts, 0, 4 ); 00053 } else if ($n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23) { 00054 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) . 00055 " " . substr( $ts, 0, 4 ); 00056 } else if ($m == 4 || $m == 8 || $m == 10) { 00057 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) . 00058 " " . substr( $ts, 0, 4 ); 00059 } else { 00060 $d = (0 + $n) . " di " . $this->getMonthName( $m ) . 00061 " " . substr( $ts, 0, 4 ); 00062 } 00063 return $d; 00064 } 00065 00066 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) { 00067 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); } 00068 $datePreference = $this->dateFormat( $format ); 00069 if ( $datePreference == 'ISO 8601' ) { 00070 return parent::timeanddate( $ts, $adj, $format, $tc ); 00071 } else { 00072 return $this->date( $ts, $adj, $format, $tc ) . ' a ' . 00073 $this->time( $ts, $adj, $format, $tc ); 00074 } 00075 } 00076 }