Page MenuHomePhabricator

action=parse&prop=langlinks should provide language names
Closed, ResolvedPublic

Description

Currently action=parse&prop=langlinks returns something like

{
"lang": "de",
"url": "https://de.wikipedia.org/wiki/Foo",
"*": "Foo"
}

which is not a real substitute for the deprecated languageshtml, as you need a second request or a static list to get a useful text/tooltip for the link. The API should add the name of the language (in that language and in the user's language) to the result, i.e.

{
"lang": "de",
"langname": "German",
"autonym": "Deutsch",
"url": "https://de.wikipedia.org/wiki/Foo",
"*": "Foo"
}


Version: 1.23.0
Severity: enhancement

Details

Reference
bz58627

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:31 AM
bzimport set Reference to bz58627.

With action=query&meta=siteinfo&siprop=interwikimap you can fetch the native language names and with action=query&meta=siteinfo&siprop=interwikimap&siinlanguagecode=de the languge names in the requested language.

But having this as extra data on action=parse sounds better to avoid multiply requests.

Not requeted, but I added the both params to prop=langlinks with gerrit 112245, because there it can also be helpful.

Change 112332 had a related patch set uploaded by Umherirrender:
Provide language names on action=parse&prop=langlinks

https://gerrit.wikimedia.org/r/112332

Change 112332 merged by jenkins-bot:
Provide language names on action=parse&prop=langlinks

https://gerrit.wikimedia.org/r/112332