How to get all allowed languages ​​for Wikidata

I am writing a tool for interacting with Wikidata, where labels and descriptions are added to the elements. But I would like to confirm that the language is supported before trying to add it.

So my question is: how to get a list of allowed language codes. The documentation describes this as UserLanguageCode, but does not provide information on obtaining valid values.

I know I can get the list of languages, by executing the following SQL operation in a database, but it is a slow and inefficient: SELECT DISTINCT term_language FROM wb_terms.

Alternatively, the list of allowed languages ​​is the same for MonolingualText statements?

+4
source share
1 answer

hoo IRC # wikidata :

JSON :

https://www.wikidata.org/w/api.php?action=paraminfo&modules=wbsetlabel

 modules[0].parameters[8].type

, MediaWiki.

+3

Source: https://habr.com/ru/post/1686695/


All Articles