Am 08.01.2024 um 07:54 schrieb Strainu:
I'm trying to add a "translate" link to [[:ro:Template:Ill-wd]] (which indicates a subject by it's wikidata id) and I need to determine the original language. Is there a way to determine if the current user prefers/knows some languages except the wiki's own language? I know I can use the interface language, but for the vast majority of users that's identical to the content language.

MediaWiki core does not support this, but the Babel extension does. It offers an API, too: https://www.mediawiki.org/wiki/Extension:Babel

--
Daniel Kinzler
Principal Software Engineer, Platform Engineering
Wikimedia Foundation