MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
list=messagecollection (mc)
- This module requires read rights.
- This module can be used as a generator.
- Source: Translate
- License: GPL-2.0-or-later
Query MessageCollection about translations.
- mcgroup
Message group. See action=query&meta=messagegroups.
- This parameter is required.
- mclanguage
Language code.
- Default: en
- mclimit
How many messages to show (after filtering).
- Type: integer or max
- The value must be between 1 and 5,000.
- Default: 500
- mcoffset
When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.
- Default: (empty)
- mcfilter
Message collection filters. Use ! to negate condition. For example !fuzzy means list only all non-fuzzy messages. Filters are applied in the order given.
- fuzzy
- Messages with fuzzy tag.
- optional
- Messages which should be translated only if changes are necessary.
- ignored
- Messages which are never translated.
- hastranslation
- Messages which have a translation regardless if it is fuzzy or not.
- translated
- Messages which have a translation which is not fuzzy.
- changed
- Messages which have been translated or changed since last export.
- reviewer:N
- Messages where the user number N is among reviewers.
- last-translator:N
- Messages where the user number N is the last translator.
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- Default: !optional|!ignored
- mcprop
Which properties to get:
- definition
- Message definition.
- translation
- Current translation (without !!FUZZY!! string if any, use the tags to check for outdated or broken translations).
- tags
- Message tags, like optional, ignored and fuzzy.
- properties
- Message properties, like status, revision, last-translator. Can vary between messages.
- revision
- Deprecated. Use mcprop=properties.
- Values (separate with | or alternative): definition, properties, tags, translation, revision
- Default: definition|translation
- List of supported languages
- api.php?action=query&meta=siteinfo&siprop=languages [open in sandbox]
- List of non-optional message definitions for the group "page-Example"
- api.php?action=query&list=messagecollection&mcgroup=page-Example [open in sandbox]
- List of optional messages in Finnish with tags for the group "page-Example"
- api.php?action=query&list=messagecollection&mcgroup=page-Example&mclanguage=fi&mcprop=definition|translation|tags&mcfilter=optional [open in sandbox]
- More information about latest translation revisions for the group "page-Example"
- api.php?action=query&generator=messagecollection&gmcgroup=page-Example&gmclanguage=nl&prop=revisions [open in sandbox]
meta=messagegroups (mg)
- This module requires read rights.
- Source: Translate
- License: GPL-2.0-or-later
Return information about message groups.
Note that the uselang parameter affects the output of language dependent parts.
- mgdepth
When using the tree format, limit the depth to this many levels. Value 0 means that no subgroups are shown. If the limit is reached, the output includes a "groupcount" value, which states the number of direct children.
- Type: integer
- Default: 100
- mgfilter
Only return messages with IDs that match one or more of the inputs given (case-insensitive, separated by pipes, * wildcard).
- Separate values with | or alternative.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- Default: (empty)
- mgformat
In the tree format message groups can exist in multiple places in the tree.
- One of the following values: flat, tree
- Default: flat
- mgiconsize
Preferred size of rasterised group icon.
- Type: integer
- Default: 64
- mgprop
What translation-related information to get:
- id
- Include ID of the group.
- label
- Include label of the group.
- description
- Include description of the group.
- class
- Include class name of the group.
- namespace
- Include namespace of the group. Not all groups belong to a single namespace.
- exists
- Include self-calculated existence property of the group.
- icon
- Include URLs to icon of the group.
- priority
- Include priority status like discouraged.
- prioritylangs
- Include preferred languages. If not set, this returns false.
- priorityforce
- Include priority status - is the priority languages setting forced.
- workflowstates
- Include the workflow states for the message group.
- sourcelanguage
- Include the source language for the message group.
- subscription
- Include whether the user is subscribed to the group.
- Values (separate with | or alternative): class, description, exists, icon, id, label, namespace, priority, priorityforce, prioritylangs, sourcelanguage, subscription, workflowstates
- Default: id|label|description|class|exists
- mgroot
When using the tree format, instead of starting from top level start from the given message group, which must be an aggregate message group. When using flat format only the specified group is returned.
- Default: (empty)
- mglanguageFilter
Only return message groups that can be translated to the given language.
- Default: (empty)
- Show message groups
- api.php?action=query&meta=messagegroups [open in sandbox]
meta=messagegroupstats (mgs)
- This module requires read rights.
- Source: Translate
- License: GPL-2.0-or-later
Query message group stats.
- mgsoffset
When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.
- Default: 0
- mgsgroup
Message group ID. See action=query&meta=messagegroups.
- This parameter is required.
- mgssuppresscomplete
Do not display languages which have completed translation
- Type: boolean (details)
- mgssuppressempty
Do not display languages which do not have any translations
- Type: boolean (details)
- List of translation completion statistics for the group "page-Example"
- api.php?action=query&meta=messagegroupstats&mgsgroup=page-Example [open in sandbox]
meta=messagetranslations (mt)
- This module requires read rights.
- Source: Translate
- License: GPL-2.0-or-later
Query all translations for a single message.
- mttitle
Full title of a known message.
- This parameter is required.
- mtoffset
When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.
- Type: integer
- Default: 0
- List of translations in the wiki for "MediaWiki:January"
- api.php?action=query&meta=messagetranslations&mttitle=MediaWiki:January [open in sandbox]
action=translationreview
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: Translate
- License: GPL-2.0-or-later
Mark translations reviewed.
- revision
The revision number to review.
- This parameter is required.
- Type: integer
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
- Review revision 1
- api.php?action=translationreview&revision=1&token=foo [open in sandbox]
action=ttmserver
- This module requires read rights.
- Source: Translate
- License: GPL-2.0-or-later
Query suggestions from translation memories.
- service
Which of the available translation services to use.
- One of the following values: TTMServer
- Default: TTMServer
- sourcelanguage
The language code of the source text.
- This parameter is required.
- targetlanguage
The language code of the suggestion.
- This parameter is required.
- text
The text to find suggestions for.
- This parameter is required.
- Get suggestions for translating "Help" from English to Finnish
- api.php?action=ttmserver&sourcelanguage=en&targetlanguage=fi&text=Help [open in sandbox]
action=groupreview
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: Translate
- License: GPL-2.0-or-later
Set message group workflow states.
- group
Message group. See action=query&meta=messagegroups.
- This parameter is required.
- language
Language code.
- Default: en
- state
The new state for the group.
- This parameter is required.
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
- Mark the state of the German translation for the message group "group-Example" as ready
- api.php?action=groupreview&group=page-Example&language=de&state=ready&token=foo [open in sandbox]