Hi Daniel,
Sadly "[AUTO_LANGUAGE]" is a magic word managed by the GUI itself[1] (using
javascript on the client browser) and explains why this query cannot be
used as-is via the sparql endpoint.
You can check by using a very simple query[2] and inspect the query sent to
the sparql endpoint using your browser debugging tool.
There seems to be discussions around standardizing[3] something similar to
the wdsq label service at the sparql level but I'm not sure if this is
covering this case: have a way to pass a user preferred language through
some content negotiation HTTP headers like "Accept-Language".
David
1:
On Mon, Aug 30, 2021 at 8:53 PM Daniel Mietchen via Wikidata <
wikidata(a)lists.wikimedia.org> wrote:
Dear all,
we're doing a Scholia hackathon right now, and in the context of
internationalization, one of the issues that came up was how AUTO_LANGUAGE
can be used outside the WDQS GUI.
Our intuitive assumption would have been that the AUTO_LANGUAGE gets
inserted into the query, that query then runs on WDQS, and the results are
displayed/ available via JSON. However, it seems that the query is being
sent to WDQS with AUTO_LANGUAGE as a variable.
Specifically, the JSON response to a query containing AUTO_LANGUAGE does
not seem to contain the language information. Is this correct/ intended?
More details via
https://github.com/WDscholia/scholia/issues/1640#issuecomment-908575849
Thanks for any pointers,
Daniel
_______________________________________________
Wikidata mailing list -- wikidata(a)lists.wikimedia.org
To unsubscribe send an email to wikidata-leave(a)lists.wikimedia.org