Currently, SiteLookup is backed by the information in the sites table. The information in this table is incorrect for many wikis in the Wikimedia cluster. In particular:
- the site language is set to always be the same as the interwiki prefix. This is not correct for sites like simple.wikipedia.org, which should have the language code "en". This could be solved by applying the $wgDummyLanguageCode mapping when importing (or when reading, as proposed by T137534: Map dummy language codes in sites)
- the language code interwiki prefixes (e.g. "fr" or "en") are set to always point to wikipedia; this is incorrect for sites like wiktionary, where "fr" should point to fr.wiktionary.org, not fr.wikipedia.org.
- fix the import script
- manually fix the data in sites table
- switch to a different system for backing the Sites facility alltogether, see T113034: RFC: Overhaul Interwiki map, unify with Sites and WikiMap.