Wikidata-Toolkit
Wikidata-Toolkit copied to clipboard
wbsearch entities with language set return english response
Hello,
I'm trying to call the wikidata API with the following URL: https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&type=item&language=fr&strictlanguage=&search=orange
I excepted a french result for the french word but I get always an english result.
I believe the issue you are describing is tracked in T109584. To work around it you can add &uselang=fr
to the URL you are using.
Thanks @thiemowmde for your help. I took a look on the API documentation to ensure to not forget this kind of parameter before posting but the following sentence explain in a word why we have to add this parameter
Returns a label and description for the entity in the user language if possible
In my case, I doesn't have any user data because of the call from Ajax. For me this is more a documentation lake but apparently the issue is controverted :/
This thread and the wikimedia bug seem to have died. But I just ran into the same issue. I would like to add uselang as an optional property to WbGetEntitiesSearchData so I can pass it to WikiDataFetcher.searchEntities