This is the documentation page for Module:Sandbox/Was a bee/getLinkedName

Retrieving text from Wikidata and formatting it in wiki-linked style. Algorithm of this module is as follows.

UsageEdit

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|QID}}

ExamplesEdit

Case 1: Sitelink existsEdit

Input

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q42}}

Output

Douglas Adams


Case 2: Sitelink exists but which has disambiguation bracketsEdit

Input

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q6258348}}

Output

John Smith

Case 3: Sitelink doesn't exist but label existsEdit

Input

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q23366230}}

Output

Lua error in Module:Sandbox/Was_a_bee/getLinkedName at line 33: attempt to index local 'entity' (a nil value).


Case 4: Both sitelink and label doesn't existEdit

Input

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q11485627}}

Output

Hirose Shrine

ParametersEdit

aliasEdit

|alias= parameter specifies text shown as alias without changing the link target.

Input

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30}}

{{#invoke:Sandbox/Was a bee/getLinkedName|getLinkedName|Q30|alias=US}}

Output

United States of America

United States of America