There are 900-1000 sitelink codes at the moment (like "be_x_oldwiki") and each is associated with a language code and project (like "be-tarask" and "Wikipedia"). Many Lua tools are parsing sitelinks to get language code and project or creating sitelinks based on users language and project, and many of them have to hardwire a lot of confusing special cases. It would be nice to have 2 convenience functions with "official" conversion between sitelink ID (same as used by mw.wikibase.getSitelink) and language codes (same as used by Lua Language_library).
Some relevant links: