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
- License: 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: aae i ab i abs i ace i acf i acm i ady i ady-cyrl i aeb i aeb-arab i aeb-latn i af i aig i aln i alt i am i ami i an i ang i ann i anp i apc i ar i arc i arn i arq i ary i arz i as i ase i ast i atj i av i avk i awa i ay i az i azb i ba i ban i ban-bali i bar i bbc i bbc-latn i bcc i bci i bcl i bdr i be i be-tarask i bew i bg i bgc i bgn i bh i bho i bi i bjn i blk i bm i bn i bo i bpy i bqi i br i brh i bs i btm i bto i bug i bug-bugi i bxr i ca i cbk-zam i ccp i cdo i cdo-hant i cdo-latn i ce i ceb i ch i chn i chr i chy i ckb i co i cop i cps i cpx i cpx-hans i cpx-hant i cr i crh i crh-cyrl i crh-latn i crh-ro i cs i csb i cu i cv i cy i da i dag i de i de-at i de-ch i de-formal i default i dga i din i diq i dlg i dsb i dtp i dty i dua i dv i dz i ee i efi i egl i el i eml i en i en-ca i en-gb i eo i es i es-formal i et i eu i ext i fa i fat i ff i fi i fit i fj i fo i fon i fr i frc i frp i frr i fur i fvr i fy i ga i gaa i gag i gan i gan-hans i gan-hant i gcf i gcr i gd i gl i gld i glk i gn i gom i gom-deva i gom-latn i gor i got i gpe i grc i gsw i gu i guc i gur i guw i gv i ha i hak i hak-hans i hak-hant i hak-latn i haw i he i hi i hif i hif-latn i hil i hke i hno i hoc-latn i hr i hrx i hsb i hsn i ht i hu i hu-formal i hy i hyw i ia i iba i ibb i id i ie i ig i igl i ii i ik i ike-cans i ike-latn i ilo i inh i io i is i isv-cyrl i isv-latn i it i iu i ja i jam i jbo i jut i jv i ka i kaa i kab i kai i kbd i kbd-cyrl i kbp i kcg i kea i kg i kge i khw i ki i kiu i kjh i kjp i kk i kk-arab i kk-cn i kk-cyrl i kk-kz i kk-latn i kk-tr i kl i km i kn i knc i ko i ko-kp i koi i kr i krc i kri i krj i krl i ks i ks-arab i ks-deva i ksh i ksw i ku i ku-arab i ku-latn i kum i kus i kv i kw i ky i la i lad i lb i lbe i lez i lfn i lg i li i lij i liv i ljp i lki i lld i lmo i ln i lo i loz i lrc i lt i ltg i lua i lus i luz i lv i lzh i lzz i mad i mag i mai i map-bms i mdf i mg i mhr i mi i min i mk i ml i mn i mnc i mnc-latn i mnc-mong i mni i mnw i mo i mos i mr i mrh i mrj i ms i ms-arab i mt i mui i mwl i my i myv i mzn i nah i nan i nan-hant i nan-latn-pehoeji i nan-latn-tailo i nap i nb i nds i nds-nl i ne i new i nia i nit i niu i nl i nl-informal i nmz i nn i no i nod i nog i nov i nqo i nr i nrm i nso i nup i nv i ny i nyn i nyo i nys i oc i ojb i olo i om i or i os i pa i pag i pam i pap i pap-aw i pcd i pcm i pdc i pdt i pfl i pi i pih i pl i pms i pnb i pnt i prg i ps i pt i pt-br i pwn i qu i qug i rgn i rif i rki i rm i rmc i rmy i rn i ro i roa-tara i rsk i ru i rue i rup i ruq i ruq-cyrl i ruq-latn i rut i rw i ryu i sa i sah i sat i sc i scn i sco i sd i sdc i sdh i se i se-fi i se-no i se-se i sei i ses i sg i sgs i sh i sh-cyrl i sh-latn i shi i shn i shy i shy-latn i si i sjd i sje i sk i skr i skr-arab i sl i sli i sm i sma i smn i sms i sn i so i sq i sr i sr-ec i sr-el i srn i sro i ss i st i stq i sty i su i sv i sw i syl i szl i szy i ta i tay i tcy i tdd i te i tet i tg i tg-cyrl i tg-latn i th i ti i tig i tk i tl i tly i tn i to i tok i tpi i tr i tru i trv i ts i tt i tt-cyrl i tt-latn i ttj i tum i tw i ty i tyv i tzm i udm i ug i ug-arab i ug-latn i uk i ur i uz i ve i vec i vep i vi i vls i vmf i vmw i vo i vot i vro i wa i wal i war i wls i wlx i wo i wuu i wuu-hans i wuu-hant i xal i xh i xmf i xsy i yi i yo i yrl i yua i yue i yue-hans i yue-hant i za i zea i zgh i zh i zh-cn i zh-hans i zh-hant i zh-hk i zh-mo i zh-my i zh-sg i zh-tw i zu
- 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 lo ralju papri to Basque.
- api.php?action=setpagelanguage&title=Lo%20ralju%20papri&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]