From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgForceUIMsgAsContentMsg and the translation is 15% complete.

Other languages:
Deutsch • ‎English • ‎català • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎suomi • ‎македонски • ‎русский • ‎日本語
Lokalisierung: $wgForceUIMsgAsContentMsg
Array of UI messages that should be treated as content messages.
Eingeführt in Version:1.4.0
Entfernt in Version:weiterhin vorhanden
Erlaubte Werte:array of strings
Andere Einstellungen: Alphabetisch | Nach Funktion

List of system messages that should be displayed in user's interface language, even if they would ordinarily by displayed in site's content language.


When translating messages with wfMsg()[1], it is not always clear what should be considered UI messages and what should be content messages.

For example, for regular Wikipedia sites like en.wikipedia.org, there should be only one 'mainpage'; therefore when getting the link of 'mainpage', treat it as content of the site and call wfMsgForContent()[1] while, for rendering the text of the link, call wfMsg(). The code in default behaves this way. However, multilingual sites like Commons do offer different versions of 'mainpage' and the like for different languages. This array provides a way to override the default behavior. For example, to allow language specific mainpage and community portal, set

$wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );


  1. 1.0 1.1 Functions 'wfMsg()' and 'wfMsgForContent()' currently is deprecated. See replacement rules.