As a tool developer, it would be very useful to access the language fallback graph from an API.
Ideally, in one API call, we would retrieve the entire graph:
{ "frc": "fr", "de-formal": "de", "en-gb": "en", "pms": "it", ... }
Currently, the only way to retrieve this seems to be to parse the localization files of MediaWiki and extract the parent language from each such file. However, the language fallback graph evolves as new languages are added, so it would be more convenient to expose that in an API. There is also the possibility of querying individual wikis to retrieve the parent languages one-by-one:
https://pt.wikipedia.org/wiki/Especial:ApiSandbox#action=query&format=json&meta=siteinfo&formatversion=2&siprop=general
From this result we obtain the fallback chain "pt" -> "pt-br" -> "en". But it's impractical to use this to extract the entire graph. It also will not work for retrieving fallbacks for language codes that don't have a corresponding wiki.
This could either be exposed by MediaWiki itself (given that the notion of language fallback lives there already) or by Wikibase (given that it already has a wbcontentlanguages API to expose the supported languages).
Somewhat related task: T197255.