Currently, only one language can be passed via lang option. The API should either use the fallback chain also used for generating static html, or support getting a language fallback chain passed in.
|Open||None||T124286 [Epic] Wikidata language support|
|Open||None||T76216 [Epic] Language fallback|
|Resolved||adrianheine||T88275 [Bug] No language fallback applied for property labels on qualifiers and references in JS UI.|
|Resolved||adrianheine||T88426 Server-side rendering for all property links in the JS UI|
|Resolved||daniel||T94563 Support language fallbacks in wbformatvalue|
The patch above enabled language fallback without any extra options being present. Fallback is always applied based on the target language, in the same way it is applied when generating HTML. This was already the case for ValueFormatters used via SnakFormatters; the above patch enables the same default behavior for stand-alone ValueFormatters, as used by the wbformatvalue API module.
Specifying a fallback chain explicitly via the options parameter of the API module would be nice to have, but isn't needed right now. The UI doesn't even have sufficient information to build such a fallback chain, I think.