Currently, the target language for label display is determined in two ways:
- PropertyClaimsRendererFactory::newRendererFromParser() uses Parser::getTargetLanguage() which will delegate to Title::getPageLanguage() in the standard case, which in turn will usually return the wiki's content language.
- Scribunto_LuaWikibaseEntityLibrary::newImplementation() just uses $wgContLang directly.
This means labels are always rendered in the content language.
For multi-lingual wikis, we can to render labels in the user's language, and split the parser cache accordingly. This should be optional to avoid splitting the parser cache on all wikis.
It's currently unclear how to get the "correct" target language. Conceptually, it seems like Parser::getTargetLanguage() should return the user's language on multi-lingual wikis. It already does this if $this->mOptions->getInterfaceMessage() is not null.