|
Popular Keywords: old books, old book, cook books, poetry, find books, travel books, book search, bargain books, cheap books, inexpensive books, book compare, book comparison, comics, books and collectibles book, books, new books, new book, used books, used book, rare books, rare book, second hand books, second hand book, out of print books, out of print book, textbooks, used textbooks, cheap textbooks, college textbooks
MediaWiki namespace
< - MediaWiki User's GuideNote: "MediaWiki namespace" is the name of one of the 16 namespaces in the database structure of the MediaWiki software, see for an overview.
| Table of contents |
|
2 Protection 3 Strings exclusive to language file 4 MediaWiki version 1.2.6 5 See also |
The MediaWiki namespace is a mechanism allowing non-developers, in particular administrators, to customise or translate the MediaWiki web interface. It is enabled by default in recent mediawiki versions, $wgUseDatabaseMessages = true enables them.
The contents of the MediaWiki namespace pages override any corresponding settings in the language files listed in Locales for the Wikimedia projects, i.e., the static version of messages. Using the MediaWiki namespace is a bit slower.
Each message in the $wgAllMessagesEn array in Language.php [1] now corresponds to a page in the MediaWiki namespace. For example, there is a line in the php file:
"fromwikipedia" => "From $wgSitename, the free encyclopedia."
To this corresponds the page whose whole content is "From Wikipedia, the free encyclopedia.". It is the message which is displayed at the top of each page of the English Wikipedia. When this page en:MediaWiki:Fromwikipedia is edited the new message appears automatically at the top of every page of the English Wikipedia. Similarly has the content "Un article de Wikipédia, l'encyclopédie libre." (note that the page name iself is not translated). All messages defined can be viewed at Mediawiki:All_messages or Template:All_system_messages in your wiki.
Due to the special role these pages have, the usual interlanguage links have to be dispensed with.
Messages (using Meta Wikimedia as an example):
By default, all messages are protected. This is necessary for a number of reasons:
For MediaWiki version 1.3, see further . What follows below is for earlier versions.
For versions before 1.3, another important function of the MediaWiki namespace is to provide customised, often used messages to use in articles (see Access section below and the use of MSG and SUBST).
Besides use by the PHP script, messages can be accessed from inside articles. There are three special tags for this purpose, listed below. This makes it possible to create messages for boilerplate text, such as notices and warnings. Instead of pasting in the stub warning from , you could just type {{SUBST:stub}}.
A new custom message can be created by making a link in the MediaWiki namespace, such as [[MediaWiki:Example]] and editing the page with the text you wish it to contain. You may want to consider protecting the messages you create. Also list any new pages in the MediaWiki namespace in the appropriate page that tracks them.
See also .Overview
Protection
However, some messages do not suffer from any of these disadvantages, and it is expected that these messages will be identified and unprotected at some stage.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:
To view these text strings, see Locales for the Wikipedia Software.MediaWiki version 1.2.6
Access
MSG
MSGNW
See also .SUBST
If you want to use a modified version of the standard message, you have to save the standard version first, then edit it, because when applying preview the subst code is not yet replaced by the standard message in the edit box. In the edit summary of the temporary edit you can put "tmp" to indicate that you have not made an error but are still working on the page.













