Module:OSMWikiBase/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

getLabel

Usage
{{#invoke: OSMWikiBase|getLabel}}
Parameters
1 - Entity ID, e.g. Q2
2 - Language code, e.g. en, or if not given, will use the language of the current page.
Returns
if any of these properties are available, returns property value together with localized label (non-English): permanent key ID (P16), permanent tag ID (P19), permanent relation role ID (P21). Otherwise, the label in the requested language or English.

getDescription

Usage
{{#invoke: OSMWikiBase|getDescription}}
Parameters
1 - Entity ID, e.g. Q2
2 - Language code, e.g. en, or if not given, will use the language of the current page.
Returns
the description of the given entity in the specified language if available, otherwise the description in English if available, otherwise an empty string.

formatEntity

Usage
{{#invoke:OSMWikiBase|formatEntity}}
Parameters
1 - Entity ID, e.g. Q2
2 - Language code, e.g. en, or if not given, will use the language of the current page.
3 - Anchor in the data item page, e.g. P5 (optional)
Returns
a wiki markup link to the Item or Property page, with the label with Q-code as text, and the description as the tooltip.