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 = $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' =>
'ikuisesti',
148 'indefinite' =>
'ikuisesti'
152 $tokens = explode(
' ', $str );
154 if ( !is_numeric( $item ) ) {
155 if ( count( explode(
'-', $item ) ) == 3 && strlen( $item ) == 10 ) {
156 list( $yyyy, $mm, $dd ) = explode(
'-', $item );
157 $final .=
' ' . $this->
date(
"{$yyyy}{$mm}{$dd}000000" );
160 if ( isset( $weekds[$item] ) ) {
161 $final .=
' ' . $weekds[$item];
166 $final .=
' ' . $item;
169 return htmlspecialchars( 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.
date( $ts, $adj=false, $format=true, $timecorrection=false)
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list