Help:MediaWiki namespace

From Wikipedia, the free encyclopedia

This is a copy of the master help page at Meta. Do not edit this copy.
Edits will be lost in the next update from the master page. See below for more information.


Administration
Special:Import
Common.css
Navigation bar
System messages
Special:CheckUser
User rights

Help pages
Guidelines
MediaWiki help
Help page footers
View this alone

The MediaWiki namespace is one of the 16 standard namespaces in the database structure of the MediaWiki software.

Contents

Overview

The MediaWiki namespace is a mechanism allowing administrators to customise or translate the MediaWiki web interface. It is enabled by default in recent mediawiki versions, $wgUseDatabaseMessages = true enables them.

All messages defined can be viewed at Special:Allmessages with some nice features. Because this displays all system messages (over 1 MB) some users might prefer to view these messages alphabetically: @ A B C D E F G H  I  J K L M N O P Q R S T U V W X Y Z

The contents of the MediaWiki namespace pages override any corresponding settings in the language files, i.e., the static version of messages. Using the MediaWiki namespace is a bit slower than other namespaces.

Protection

By default, all messages are protected. This is necessary for a number of reasons:

  • Many messages are in plain HTML, hence users could insert malicious scripts
  • Vandalism of some messages would be extremely disruptive, for example changes to the text of the links in the sidebar would immediately be visible to all users
  • A few messages can in theory cause the software to stop working if they are changed, for example MediaWiki:Linktrail. In practice the software ignores the database contents for MediaWiki:Linktrail, taking the regular expression straight out of the message files, for performance and stability reasons.

If an administrator wishes to allow general editing of a MediaWiki page, a method is to place the message on a template, and then transclude the template back onto the MediaWiki page.

Technical details

The namespace number of MediaWiki messages is 8, with a corresponding MediaWiki_talk namespace 9 to discuss individual messages. Some projects offer templates like en:Template:editprotected (talk, backlinks, edit) to propose modifications, others have a page like Meta:Requests for help from a sysop or bureaucrat for this purpose.

Links to MediaWiki messages work like links to ordinary pages, examples:
[[MediaWiki:Edit]] MediaWiki:Edit,
[[w:de:MediaWiki:Edit]] w:de:MediaWiki:Edit,
[{{fullurl:m:MediaWiki:Edit|action=render}} demo] demo.

Each message in the $wgAllMessagesEn array in Messages.php corresponds to a page in the MediaWiki namespace. For example, there is a line in the php file:

'confirmprotect' => 'Confirm protection',

To this corresponds the page MediaWiki:Confirmprotect, and {{ int:Confirmprotect }} gives Confirm protection. When this page is edited the new message is automatically used for say http://meta.wikimedia.org/wiki/Main_page?action=protect. Similarly w:fr:MediaWiki:Confirmprotect has the content Confirmer la protection, note that the page name itself is not translated.

Inclusion

Inclusion of MediaWiki messages can make sense, as noted below historically these messages also covered the function of templates.
{{ MediaWiki:Edit }} = Edit this page, see m:Template:Ed (talk, backlinks, edit).
{{ int:Edit }} = Edit this page, colon function int: is a shorthand for MediaWiki:.
{{ int:Erehwon }} = <Erehwon>, but only as far as the message exists.
{{ MediaWiki:Erehwon }} = MediaWiki:Erehwon doesn't exist.

However many messages are not suited for inclusion, because they contain $1 and similar parameters not evaluated by the template parser, or raw CSS and XHTML markup not permitted on normal pages.

Interlanguage links

Interlanguage links in MediaWiki messages typically won't work as expected. Adding <noinclude> isn't good enough, because something has to evaluate it, as it's the case for messages included like ordinary templates, but not (unclear) for messages used internally as system messages.

Instead, one can use in-page interlanguage links on the talk pages, m:Template:ilm (talk, backlinks, edit) does this for some major projects.

Strings exclusive to language file

Some text strings cannot be customised using this feature, and so can only be changed by editing the language file. These include:

  • The namespace titles "User", "Wikipedia", "Image", etc.
  • The names of the special pages
  • Month and days-of-the-week names
  • A number of items in Special:Preferences

See also


edit

Wikipedia-specific help

At the moment m:MediaWiki:Edit on Meta and w:MediaWiki:Edit on Wikpedia are different. It's possible to use the MediaWiki talk namespace to discuss this.


This page is a copy of the master help page at Meta (for general help information all Wikimedia projects can use), with two Wikipedia-specific templates inserted. To update the main text, edit the master help page for all projects at m:Help:MediaWiki namespace. For Wikipedia-specific issues, use Template:Ph:MediaWiki namespace (the extra text at the bottom of this page) or Template:Phh:MediaWiki namespace for a Wikipedia-specific lead (text appears at the top of this page). You are welcome to copy the exact wikitext from the master page at Meta and paste it into this page at any time. To view this page in other languages see the master page at Meta.