Page MenuHomePhabricator

support for something like ANY_LANGUAGE in wikibase:language
Closed, DuplicatePublicFeature

Description

Right now, the wikibase:language function has the following pattern:

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }

This would use the browser language, and if not set or given, try 'mul', and then 'en'.

Someimes, e.g. in Scholia, we have items with only a label in a smaller language, related to the page in a smaller Wikipedia. One solution is to list all supported Wikipedia (or Wikidata) languages, but maybe that can be wrapped into something like [ANY_LANGUAGE], so that SPARQL queries can do instead:

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,[ANY_LANGUAGE]" . }

The expected behavior can be discussed when there are multiple languages that it can select from, but I'd be happy with the sample() solutions here, to just give some hit.

For some context, see https://github.com/WDscholia/scholia/pull/2310#discussion_r1806800969

Event Timeline

Yes. In Scholia, I have tended to use a lengthy list of languages, something like SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,cz,da,de,es,fr,jp,nb,nl,uk,zh," . } to catch these situation. For instance, a lot of Czech books have been uploaded with only Czech label. For me, with a da or en environment, these would only show up as a QID. mul will to a certain degree help with the situation and @EgonWillighagen has been implementing [AUTO_LANGUAGE],mul,en as Scholia's default labeling service parameter now, but I think that [ANY_LANGUAGE] or similar would help

Aklapper changed the subtype of this task from "Task" to "Feature Request".Oct 19 2024, 2:20 PM

@EgonWillighagen: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests, and fill in all the sections in the template. Thanks.

please use the feature request form

I am sorry; I was looking for that but clearly overlooked it :(