query: SELECT ?item ?itemLabel ?article (IF(bound(?article),CONCAT("{","{subst:Urltowiki\u007Curl=", str(?article), "\u007Cdisplay=", str(?itemLabel), "}","}"),str(?itemLabel)) As ?wparticle) WHERE { { ?item wdt:P31 wd:Q20978687 } UNION { ?item wdt:P31/wdt:P279* wd:Q510662; wdt:P17 wd:Q142 } . OPTIONAL { ?article schema:about ?item ; schema:inLanguage "fr" ; schema:isPartOf <https://fr.wikipedia.org/> } . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . } }