Template:WD version/doc

{	"params": { "1": {			"aliases": [ "qidmain" ],			"label": "QID Main", "description": "The qid number from the main wikidata record.", "type": "string", "required": true },		"2": {			"aliases": [ "qidscan" ],			"label": "QID Scan", "description": "The qid number for a Wikidata item with property P996, linking to the scan; this adds a link to Index", "type": "string", "suggested": true }	},	"description": "This produces a citation-like statement for use on Portal and version pages using information from Wikidata." }

Example
For a work written by John Napier and a translator William Rae Macdonald

&lbrace;&lbrace;WD version|Q107661385|Q107644932&rbrace;&rbrace; produces:

The second parameter is optional, and if present, may even point to the same Wikidata item, as long as the item has property P996 pointing to the file at Commons:

&lbrace;&lbrace;WD version|Q107661385&rbrace;&rbrace; produces:

more examples
The template is fairly flexible for the information it needs and can use and that is available:
 * version