Last modified: 2014-06-29 21:41:58 UTC
For be-x-old.wikipedia.org (lang. code: be-tarask), when a site-link is added for the item, 'lang' attribute for site-link page title is set to 'be-x-old' which is wrong (it should be 'be-tarask'). As I see, it's either Repo not aware of the true wiki language, or it's a configuration concern and the language was set according to the domain (see Bug 9823). To conclude, I think for now it's mostly a minor layout issue, but who knows... It's better to have real internal data.
The "be-x-old" comes from the site id, and is not really a language code. I think people gets slightly confused because -wiki is stripped off and then it looks like a language code, which it is not, it is the initial part of the site id. Note also that the site id can be for something completely else than Wikipedia, and as such the code will not reflect a language at all. We could although change this somehow so it is clearer that this is part of the site id, and only by accident is similar to the language code.
Reopening - What the original reporter was talking about and what I want to report is the lang attribute of text (links). Now that you know site id is not essentially identical to its language code, you shouldn't put site id into lang="" directly and should fetch its language code instead. This affects both Repo (on item pages) and Client (in sidebar).
Fetching the language code from the Language object for ~300 different languages will not work without changes to how the Language objects are handled.
(In reply to comment #3) > Fetching the language code from the Language object for ~300 different > languages will not work without changes to how the Language objects are > handled. Is `sites` table somehow used in Wikibase? It has a `site_language` field. Can we use it? (Although, now it has the wrong code for some wikis.)
Well if this can't be resolved easily and you don't dare to use globals, you may try to map your prefix part in site ID through $wgDummyLanguageCodes.
*** This bug has been marked as a duplicate of bug 57706 ***
*** Bug 57706 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > Fetching the language code from the Language object for ~300 different > languages will not work without changes to how the Language objects are > handled. Adding bug 41103 as dependence here.