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
action=setpagelanguage
(main | setpagelanguage)
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: MediaWiki
- Licence: GPL-2.0-or-later
Change the language of a page.
Changing the language of a page is not allowed on this wiki.
Enable $wgPageLanguageUseDB to use this action.
Specific parameters:
Other general parameters are available.
- title
Title of the page whose language you wish to change. Cannot be used together with pageid.
- pageid
Page ID of the page whose language you wish to change. Cannot be used together with title.
- Type: integer
- lang
Language code of the language to change the page to. Use default to reset the page to the wiki's default content language.
- This parameter is required.
- One of the following values: de, default, en, en-gb, es, fr, it, ja, ko, lzh, nl, pl, pt, pt-br, ru, th, uk, zh, zh-cn, zh-hans, zh-hant, zh-hk, zh-tw
- reason
Reason for the change.
Change tags to apply to the log entry resulting from this action.
- Values (separate with | or alternative):
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
Examples:
- Change the language of the page Main Page to Basque.
- api.php?action=setpagelanguage&title=Main%20Page&lang=eu&token=123ABC [open in sandbox]
- Change the language of the page with ID 123 to the wiki's default content language.
- api.php?action=setpagelanguage&pageid=123&lang=default&token=123ABC [open in sandbox]