30 $this->source = $source;
38 global $wgLanguageCode;
40 return $wgLanguageCode;
51 $source = wfMessage( $this->source );
52 if ( $source->isDisabled() ) {
56 $contents = $source->text();
57 $contents = preg_replace(
'~^\s*#.*$~m',
'', $contents );
58 $messages = preg_split(
'/\s+/', $contents );
65 $definitions[$message] = wfMessage( $message )->inContentLanguage()->plain();
81 return TranslateUtils::getMessageContent( $key, $code );
83 return TranslateUtils::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.