> There are some ids like "dewiki", "enwiki" etc, which I guess can be
> interpreted to corresponding languages "de", "en" respectively. But is there
> a reliable map from these *wiki to the language code? And some are even
> using 3-letter prefix, e.g. gotwiki, xmfwiki.
You cannot infer the language from the site identifier. "enwiki" is a site identifier. The software allows having multiple sites for the same language. For instance you could have an entity that is also described on the English Wikitionary. Or an entity described on a third party website as well, such as a movie on imdb. Unfortunately it looks like we are not yet providing an actual API for accessing this information.