Hello,
I am looking for the list of supported language codes for variations of Chinese. So far in API responses I found these:
zh zh-cn zh-hans zh-hant zh-hk zh-tw zh-mo zh-sg
"Configure" link in "more languages" section leads to this page: https://www.wikidata.org/wiki/Help:Navigating_Wikidata/User_Options#Babel_ex... Which in turn refers to https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects#Projects_per_lan... But apparently there is no such values as 'zh-cn', 'zh-nans' etc.
How can I get the COMPLETE list of language codes (desirably with description) for Chinese that is supported by Wikidata?
Best regards, Vlad
Hello,
I am looking for the list of supported language codes for variations of Chinese. So far in API responses I found these:
zh zh-cn zh-hans zh-hant zh-hk zh-tw zh-mo zh-sg
"Configure" link in "more languages" section leads to this page: https://www.wikidata.org/wiki/Help:Navigating_Wikidata/User_Options#Babel_ex... Which in turn refers to https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects#Projects_per_lan... But apparently there is no such values as 'zh-cn', 'zh-nans' etc.
How can I get the COMPLETE list of language codes (desirably with description) for Chinese that is supported by Wikidata?
Best regards, Vlad
P.S. I am re-sending the message as I got a reply from the previous attempt saying something about moderator approval, but the message have not got any further since then.
Hi Vlad,
I see the following zh- language codes : https://w.wiki/55W
zh zh-classical zh-cn zh-hans zh-hant zh-hk zh-min-nan zh-mo zh-my zh-sg zh-tw zh-yue
but the better list: https://www.wikidata.org/wiki/Help:Wikimedia_language_codes/lists/all it is complicated because : zh-yue = yue ; zh-min-nan = nan ; zh-classical= lzh
But apparently there is no such values as 'zh-cn', 'zh-nans' etc.
I see "zh-cn" and "zh-hans" labels.. example: Q2 Earth: https://www.wikidata.org/wiki/Special:EntityData/Q2.json
,
"zh-cn": { "language": "zh-cn", "value": "地球" }, "zh-hans": { "language": "zh-hans", "value": "地球" }, "zh-sg": { "language": "zh-sg", "value": "地球" }, "zh-hk": { "language": "zh-hk", "value": "地球" }, "zh-tw": { "language": "zh-tw", "value": "地球" }, "zh-mo": { "language": "zh-mo", "value": "地球" },
or a programmer example:
# curl -s https://www.wikidata.org/wiki/Special:EntityData/Q2.json | jq '.' | grep language | egrep 'nan|yue|lzh|zh-'
"language": "zh-hant", "language": "yue", "language": "zh-cn", "language": "zh-hans", "language": "zh-sg", "language": "zh-hk", "language": "zh-tw", "language": "zh-mo", "language": "nan", "language": "lzh", "language": "zh-my", "language": "zh-hant", "language": "zh-hans", "language": "zh-cn", "language": "zh-sg", "language": "zh-hk", "language": "zh-tw", "language": "zh-mo", "language": "lzh", "language": "yue", "language": "zh-my", "language": "lzh",
Best, Imre
Vladimir Ryabtsev greatvovan@gmail.com ezt írta (időpont: 2019. jún. 19., Sze, 2:05):
Hello,
I am looking for the list of supported language codes for variations of Chinese. So far in API responses I found these:
zh zh-cn zh-hans zh-hant zh-hk zh-tw zh-mo zh-sg
"Configure" link in "more languages" section leads to this page: https://www.wikidata.org/wiki/Help:Navigating_Wikidata/User_Options#Babel_ex... Which in turn refers to https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects#Projects_per_lan... But apparently there is no such values as 'zh-cn', 'zh-nans' etc.
How can I get the COMPLETE list of language codes (desirably with description) for Chinese that is supported by Wikidata?
Best regards, Vlad
P.S. I am re-sending the message as I got a reply from the previous attempt saying something about moderator approval, but the message have not got any further since then. _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
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
Federico
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&...), but for monolingual text there are some additional languages (https://www.wikidata.org/w/api.php?action=query&meta=wbcontentlanguages&...).
Cheers, Lucas
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 mail@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...
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&... ), but for monolingual text there are some additional languages ( https://www.wikidata.org/w/api.php?action=query&meta=wbcontentlanguages&... ).
Cheers, Lucas
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata