32 $this->source = $source;
40 global $wgLanguageCode;
42 return $wgLanguageCode;
53 $source = wfMessage( $this->source );
54 if ( $source->isDisabled() ) {
58 $contents = $source->text();
59 $contents = preg_replace(
'~^\s*#.*$~m',
'', $contents );
60 $messages = preg_split(
'/\s+/', $contents );
67 $definitions[$message] = wfMessage( $message )->inContentLanguage()->plain();
83 return Utilities::getMessageContent( $key, $code );
85 return Utilities::getMessageContent( $key,
false );
This is the interface and base implementation of unmanaged message groups.
$id
Group-wide unique id of this group.
$messages
All the messages for this group, by language code.
Group for messages that can be controlled via a page in MediaWiki namespace.
getSourceLanguage()
Defaults to wiki content language.
getDefinitions()
Fetch definitions from database.
__construct( $id, $source)
getMessage( $key, $code)
Returns of stored translation of message specified by the $key in language code $code.