Module:Sandbox/RexxS/Iscountry/doc

{{Module rating }} Demo routine to determine whether a Wikidata entity is a country.

It takes an entity-id as the parameter |qid=.

Usage

From wiki-text:

  • {{#invoke:Sandbox/RexxS/Iscountry|iscountry |qid=entity-id}}

From another module: <syntaxhighlight lang="lua"> local iscountry = require("Module:Sandbox/RexxS/Iscountry)._iscountry" if iscountry(qid) then

   ...

end </syntaxhighlight>

Examples

For (Q12130)

  • {{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q12130}}

For (Q142)

  • {{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q142}}