Manual:WfMsgExt

From MediaWiki.org
Jump to: navigation, search

wfMsgExt is a mediawiki function within GlobalFunctions.php to retrieve the contents of a system message as listed in Special:Allmessages

function wfMsgExt( $key, $options ) : string.

returned string is value of the specified system message for the currently active language.

$key string representing a valid message-id

$options is a string containing one of the following options (or an array containing one or more of these strings):

options description
parse parses wikitext to html
parseinline parses wikitext to html and removes the surrounding p's added by parser or tidy
escape filters message through php function htmlspecialchars
escapenoentities filters message through php function htmlentities - equivalent to htmlspecialchars, but allows entity references like   through replaceafter: parameters are substituted after parsing or escaping
parsemag transform the message using magic words
content fetch message for content language instead of interface; also can accept a single associative argument, of the form 'language' => 'xx':
language Language object or language code to fetch message for (overridden by content), its behavior with parser, parseinline and parsemag is undefined.

Related functions

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox