Add a parameter to use `lang(...) = "xx"` instead of langmatches(...,"xx") in the generated SPARQL query
Hello again!
I am having an issue while working with multilanguage on Wikidata. As Wikidata has multiple types of english ("en-gb", "en-ca" and so on) In this example, multiple "dientamoebiasis" are shown as there are "en", "en-gb" and "en-ca" labels on Wikidata.

This is a behaviour of FILTER(LANGMATCHES(LANG(?disease_label), "en")), but is this a desired behaviour?
Is there anyway to change/customize the code for generating FILTER(LANG(?disease_label) = "en") instead?
This would restrict the queries to exactly the target language, and avoid duplicates.
Thanks! Best, Tiago
This is a behaviour of FILTER(LANGMATCHES(LANG(?disease_label), "en")), but is this a desired behaviour?
Yes
Is there anyway to change/customize the code for generating FILTER(LANG(?disease_label) = "en") instead?
Yes, by providing a custom SPARQL datasource : https://docs.sparnatural.eu/OWL-based-configuration-datasources#your-own-sparql-query-lists--autocomplete and see an example at https://github.com/sparna-git/sparnatural.eu/blob/main/demos/demo-smt-cim10/sparnatural-config.ttl#L117
@tfrancart oh, thanks! I am missing something, perhaps, though. I am not referring to the labels returned by the drop down menus, but by the query itself.
This is handled by the code at https://github.com/sparna-git/Sparnatural/blob/b6a44595d2711197b7559b7fa4f09c281a8e1a8d/src/Query.js#L790-L809
and
https://github.com/sparna-git/Sparnatural/blob/b6a44595d2711197b7559b7fa4f09c281a8e1a8d/src/Query.js#L510-L517
Can I change this behaviour with datasource too?
Ho yes sorry I misunderstood. You are right and you pointed to the right place in the code :-) and, no, this cannot be changed through datasources, unfortunately. We could add a config parameter to handle that, but would be an evolution
Oh, I see. It would be great to have a config parameter for that! One more thing for the wishlist :) . Thanks again!
Let's leave this issue opened as a wishlist entry. Keep on adding to the wishlist and ask questions :-)