Page MenuHomePhabricator

Provide through the API the complete list of languages supported by Wikidata
Closed, DuplicatePublic

Description

There are 3 sources:

  • core, a public method in a languages/ class
  • config, not exposed through a public method, but in IS
  • Wikibase extension, not exposed through a public method, but in WikibaseRepo class

We should provide an API method to get these languages as a languace code / autonym JSON array.

@Harmonia_Amanda wanted to get such the list and the three sources to mix is a little confusing.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 10 2017, 3:32 PM

TL;DR of the linked task (thanks @matej_suchanek!): this will be available as api.php?action=query&meta=wbcontentlanguages. You can optionally specify the context (term, monolingualtext, term-lexicographical; default: term) and which properties to return for each language (language code, autonym, and/or name in user language; default: language code). Currently live on Beta Wikidata (API sandbox), should be deployed to Wikidata next Wednesday evening.