API:Allmessages
| Allmessages | ||
|---|---|---|
| Return messages from this site. This module cannot be used as a Generator. |
||
| Prefix | am | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Lists the contents of some or all interface messages.
Parameters[edit]
ammessages: Which messages to output.*means all messages. (Default:*)amprop: Which properties to get. Possible values:default. (Default:default) 1.16+default: The default message. Note: this is only emitted if not identical to the current message (after parsing, if applicable). 1.16+
amenableparser: Set to enable parser, will preprocess the wikitext of message. Will substitute magic words, handle templates, etc. 1.16+amnocontent: If set, do not include the content of the messages in the output. 1.19+amincludelocal: Also include local messages, i.e. messages that don't exist in the software but do exist as a MediaWiki: page. This lists all MediaWiki: pages, so it will also list those that aren't 'really' messages such as Common.js. 1.19+amtitle: Page name to use as context when parsing message (for enableparser option). 1.18+amargs: Arguments to be substituted into message. 1.16+amprefix: Return messages with this prefix. 1.18+amfilter: Return only messages with names that contain this string.amcustomised: Return only messages in this customization state. 1.18+amlang: Return messages in this language.amfrom: Return messages starting at this message (must be a valid message name). 1.15+amto: Return messages ending at this message (must be a valid message name). 1.17+
Example[edit]
Get the Dutch translations of some messages
api.php? action=query& meta=allmessages& ammessages=august|mainpage|edit|rollback-success|Acct%20creation%20throttle%20hit|thismessagedoesntexist& amlang=nl [try in ApiSandbox]
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?>
<api>
<query>
<allmessages>
<message name="august">augustus</message>
<message name="mainpage">Hoofdpagina</message>
<message name="edit">Bewerken</message>
<message name="rollback-success">Wijzigingen door $1 teruggedraaid; laatste versie van $2 hersteld.</message>
<message name="thismessagedoesntexist" missing="" />
</allmessages>
</query>
</api>
|
Possible errors[edit]
None.