Skip to content

Commit 71cbc90

Browse files
committed
Try to get the localized version of the wikipedia article before defaulting to the English version.
Tested with Spanish on physical Android device. Other notes: Difficulties building with gradle due to dexcount plugin: KeepSafe/dexcount-gradle-plugin#234. In testing, disabled the plugin.
1 parent 6b2dd8c commit 71cbc90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/resources/queries/nearby_query.rq

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ SELECT
3939
# Get emoji
4040
OPTIONAL { ?classId wdt:P487 ?emoji0. }
4141
OPTIONAL { ?classId wdt:P279*/wdt:P487 ?emoji1. }
42+
43+
OPTIONAL {
44+
?wikipediaArticle schema:about ?item ;
45+
schema:isPartOf <https://${LANG}.wikipedia.org/> .
46+
SERVICE wikibase:label { bd:serviceParam wikibase:language "${LANG}" }
47+
}
4248
OPTIONAL {
4349
?wikipediaArticle schema:about ?item ;
4450
schema:isPartOf <https://en.wikipedia.org/> .

0 commit comments

Comments
 (0)