45 # These rules don't cover the whole language.
46 # They are used only for site names.
49 $aou = preg_match(
'/[aou][^äöy]*$/i', $word );
51 # The flag should be false for compounds where the last word has only neutral vowels (e/i).
52 # The general case cannot be handled without a dictionary, but there's at least one notable
53 # special case we should check for:
55 if ( preg_match(
'/wiki$/i', $word ) ) {
59 # append i after final consonant
60 if ( preg_match(
'/[bcdfghjklmnpqrstvwxz]$/i', $word ) ) {
69 $word .= ( $aou ?
'sta' :
'stä' );
72 $word .= ( $aou ?
'a' :
'ä' );
75 # Double the last letter and add 'n'
76 $word .= mb_substr( $word, -1 ) .
'n';
79 $word .= ( $aou ?
'ssa' :
'ssä' );
106 'monday' =>
'maanantai',
107 'tuesday' =>
'tiistai',
108 'wednesday' =>
'keskiviikko',
109 'thursday' =>
'torstai',
110 'friday' =>
'perjantai',
111 'saturday' =>
'lauantai',
112 'sunday' =>
'sunnuntai',
124 'next' =>
'seuraava',
125 'tomorrow' =>
'huomenna',
127 'seconds' =>
'sekuntia',
128 'second' =>
'sekunti',
131 'minutes' =>
'minuuttia',
132 'minute' =>
'minuutti',
139 'weeks' =>
'viikkoa',
141 'fortnights' =>
'tuplaviikkoa',
142 'fortnight' =>
'tuplaviikko',
143 'months' =>
'kuukautta',
144 'month' =>
'kuukausi',
147 'infinite' =>
'ikuinen',
148 'indefinite' =>
'ikuinen',
149 'infinity' =>
'ikuinen'
153 $tokens = explode(
' ', $str );
154 foreach ( $tokens as $item ) {
155 if ( !is_numeric( $item ) ) {
156 if ( count( explode(
'-', $item ) ) == 3 && strlen( $item ) == 10 ) {
157 list( $yyyy, $mm, $dd ) = explode(
'-', $item );
158 $final .=
' ' . $this->
date(
"{$yyyy}{$mm}{$dd}000000" );
161 if ( isset( $weekds[$item] ) ) {
162 $final .=
' ' . $weekds[$item];
167 $final .=
' ' . $item;
170 return trim( $final );
$wgGrammarForms
Some languages need different word forms, usually for different cases.
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
translateBlockExpiry( $str, User $user=null, $now=0)
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
date( $ts, $adj=false, $format=true, $timecorrection=false)
The User object encapsulates all of the user-specific settings (user_id, name, rights,...