Tgr added a comment.

uselang is the user interface language - the conceptual equivalent of going into your preferences and changing the language (the actual equivalent too, overriding that setting is exactly what it does). That setting is accessible to MediaWiki methods called by the API, and used by some of them, but it's used very little (just like how MediaWiki's behavior is not affected much by your language settings). The only thing I can think of is that in action=""> some wikitext constructs like {{int:}} will translate to that language. API response message translations are actually determined by a separate parameter, errorlang, although it does fall back to uselang (and then that falls back to your user preferences and then to the wiki content language).

Anyway when you translate a Wikidata description on the web, it is not translated into your user preferences language, it is translated into the language you select, so likewise in the API you need to select the target language separately from your user interface language settings. As Bernd says that's the language parameter and Special:ApiSandbox is the nice way to find out.

As for zh-yue vs. yue, I'm not familiar with the details of that mess, other than that yue is the real ISO language code but we are stuck with zh-yue in some places that are particularly hard to change (see here). Also T30441#3824111 seems to say that zh-yue is used as a language variant on zh.wikipedia, as opposed to zh-yue.wikipedia.org which is in yue, a separate language (as far as MediaWiki is concerned).


TASK DETAIL

EMAIL PREFERENCES

To: Tgr
Cc: Jdforrester-WMF, JMinor, JoeWalsh, Aklapper, ABorbaWMF, cooltey, Dbrant, Hello903hello, Tgr, bearND, Charlotte, RHo, Liuxinyu970226, deryckchan, Nandana, Lahi, Gq86, Sharvaniharan, schoenbaechler, GoranSMilovanovic, QZanden, cmadeo, Taquo, LawExplorer, catalandres, _jensen, D3r1ck01, Karthik_sripal, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to