Thanks everybody, that was very helpful! Still I have some more questions.

Indeed, I need to know all possible languages for
labels/descriptions/aliases that can be returned by API. I need it to group
Chinese languages, probably just separate simplified and traditional
writing.
I found that the web UI supports only these variations of Chinese: zh,
zh-classical, lzh, zh-hans, zh-hant, zh-yue, yue, nan.
It does NOT support zh-cn, zh-hk, zh-mo, zh-sg, zh-tw. At least when I use
Babel extension like {{#babel:en-5|ru-N|zh-cn-0|zh-tw-0}} it does NOT
create lines for these languages. Still, there ARE labels in zh-cn, zh-tw
etc.

1. So the first question is how are labels/aliases for these code are being
populated? Is it through API only?
2. Imre Samu (or anyone who knows it), when you say "zh-yue = yue;
zh-min-nan = nan; zh-classical= lzh", do you mean API automatically treats
them equivalently? Say I wrote a label in yue, will the API return me both
yue and zh-yue when I query it (and reversely editing zh-yue will affect
yue)?
3. What about pure zh? Is it treated as a separate language for
labels/aliases/descriptions or unites al sub-languages?

Vlad

вт, 18 июн. 2019 г. в 23:30, Lucas Werkmeister <m...@lucaswerkmeister.de>:

> On 19.06.19 07:17, Federico Leva (Nemo) wrote:
> > Vladimir Ryabtsev, 19/06/19 03:04:
> >> How can I get the COMPLETE list of language codes (desirably with
> >> description) for Chinese that is supported by Wikidata?
> >
> > Languages supported by a MediaWiki instance are expected to be all
> > listed at siprop=languages in the API:
> > <https://www.mediawiki.org/wiki/API:Siteinfo>
> > <
> https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=languages
> >
> >
>
> There’s also a separate API for all the languages Wikibase supports. For
> labels/descriptions/aliases, that’s currently the same list
> (
> https://www.wikidata.org/w/api.php?action=query&meta=wbcontentlanguages&wbclcontext=term&formatversion=2
> ),
> but for monolingual text there are some additional languages
> (
> https://www.wikidata.org/w/api.php?action=query&meta=wbcontentlanguages&wbclcontext=monolingualtext&formatversion=2
> ).
>
> Cheers,
> Lucas
>
>
>
> _______________________________________________
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to