Manual:WfMsgExt
From MediaWiki.org
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
- wfMsg
- wfMsgHtml
- wfMsgWikiHtml
- wfMsgForContent
- wfMessage (Significantly easier syntax than wfMsgExt, but just as flexible. Generally recommended in new code)