Go to the documentation of this file.
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 ) );
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
when a variable name is used in a it is silently declared as a new masking the global
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
translateBlockExpiry( $str, User $user=null, $now=0)
date( $ts, $adj=false, $format=true, $timecorrection=false)
$wgGrammarForms
Some languages need different word forms, usually for different cases.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Internationalisation code.