Nápověda k MediaWiki API
Toto je automaticky generovaná dokumentační stránka k MediaWiki API.
Dokumentace a příklady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=setpagelanguage
(main | setpagelanguage)
- Tento modul vyžaduje oprávnění ke čtení.
- Tento modul vyžaduje oprávnění k zápisu.
- Tento modul přijímá pouze požadavky POST.
- Zdroj: MediaWiki
- Licence: GPL-2.0-or-later
Change the language of a page.
Parametry:
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.
- Jedna z následujících hodnot: cs, default, en, qqq, sk, zh
- reason
Reason for the change.
- tags
Change tags to apply to the log entry resulting from this action.
- Hodnoty (oddělené | nebo alternativou.):
- token
Token typu „csrf“ získaný pomocí action=query&meta=tokens.
- This parameter is required.
Příklady:
- Change the language of the page Special:MyLanguage/Hlavní strana to Basque.
- api.php?action=setpagelanguage&title=Speci%C3%A1ln%C3%AD%3AMyLanguage%2FHlavn%C3%AD%20strana&lang=eu&token=123ABC [otevřít v pískovišti]
- 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 [otevřít v pískovišti]