Demo routine to determine whether a Wikidata entity is a country.
It takes an entity-id as the parameter .
From wiki-text:
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|iscountry |qid=''entity-id''}}
From another module:
For
<nowiki>{{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q12130}}</nowiki>
→For
<nowiki>{{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q142}}</nowiki>
→