The script that populates the sites table assumes that the subdomain is the content language code. This is not true for all wikis. This patch introduces a mapping to fix this issue on the fly, based on $wgDummyLanguageCodes.
This is driven by the need to avoid "bad" language codes when creating wikidata items from the client, when "linking" two pages on different wikis. When we do this, we use the language code from the sites table for the labels of the new item. We would like to forbid "dummy" languages in labels and descriptions, for consistency.