25 if ( isset( $grammarForms[
'fi'][$case][$word] ) ) {
26 return $grammarForms[
'fi'][$case][$word];
29 # These rules don't cover the whole language.
30 # They are used only for site names.
33 $aou = preg_match(
'/[aou][^äöy]*$/i', $word );
35 # The flag should be false for compounds where the last word has only neutral vowels (e/i).
36 # The general case cannot be handled without a dictionary, but there's at least one notable
37 # special case we should check for:
39 if ( preg_match(
'/wiki$/i', $word ) ) {
43 # append i after final consonant
44 if ( preg_match(
'/[bcdfghjklmnpqrstvwxz]$/i', $word ) ) {
53 $word .= ( $aou ?
'sta' :
'stä' );
56 $word .= ( $aou ?
'a' :
'ä' );
59 # Double the last letter and add 'n'
60 $word .= mb_substr( $word, -1 ) .
'n';
63 $word .= ( $aou ?
'ssa' :
'ssä' );
90 'monday' =>
'maanantai',
91 'tuesday' =>
'tiistai',
92 'wednesday' =>
'keskiviikko',
93 'thursday' =>
'torstai',
94 'friday' =>
'perjantai',
95 'saturday' =>
'lauantai',
96 'sunday' =>
'sunnuntai',
108 'next' =>
'seuraava',
109 'tomorrow' =>
'huomenna',
111 'seconds' =>
'sekuntia',
112 'second' =>
'sekunti',
115 'minutes' =>
'minuuttia',
116 'minute' =>
'minuutti',
123 'weeks' =>
'viikkoa',
125 'fortnights' =>
'tuplaviikkoa',
126 'fortnight' =>
'tuplaviikko',
127 'months' =>
'kuukautta',
128 'month' =>
'kuukausi',
131 'infinite' =>
'ikuinen',
132 'indefinite' =>
'ikuinen',
133 'infinity' =>
'ikuinen'
137 $tokens = explode(
' ', $str );
138 foreach ( $tokens as $item ) {
139 if ( !is_numeric( $item ) ) {
140 if ( count( explode(
'-', $item ) ) == 3 && strlen( $item ) == 10 ) {
141 [ $yyyy, $mm, $dd ] = explode(
'-', $item );
142 $final .=
' ' . $this->
date(
"{$yyyy}{$mm}{$dd}000000" );
145 if ( isset( $weekds[$item] ) ) {
146 $final .=
' ' . $weekds[$item];
151 $final .=
' ' . $item;
154 return trim( $final );
159class_alias( LanguageFi::class,
'LanguageFi' );
A class containing constants representing the names of configuration variables.
const GrammarForms
Name constant for the GrammarForms setting, for use with Config::get()