Page MenuHomePhabricator

Create mw.wikibase.getDescriptionByLang
Open, Needs TriagePublic


It would be useful to be able to use Lua to fetch a description given an input language, without having to fetch and parse the whole item. Ideally, this would also allow an option to use the fallback languages or not.

According to the documentation at:
we currently have mw.wikibase.getLabelByLang and mw.wikibase.getDescription - but not mw.wikibase.getDescriptionByLang.

For on-wiki discussion, see:

Note that the "WithLang" options aren't relevant here, as they just return the defined language, they don't let you select the language to use.

Related Objects


Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 20 2019, 9:44 PM

The priority for me would be to have mw.wikibase.getDescriptionByLang with no language fallback (the way that mw.wikibase.getLabelByLang already works). as we already have a request for that functionality.

It would be nice to have the option to switch language fallback on or off, but that's a secondary consideration at present.