Template:Desc/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

This is a documentation subpage for Template:Desc.
It contains usage information, categories and other content or metadata that is not part of the original template.

This template returns the description for a particular WikiBase item, using Module:OSMWikiBase.

Usage

{{Desc|entity id|language code}}

If a language code is specified:

The template returns the description for that language if available.
If not available, english is returned
If there is no description for english, no description found is returned

If no language code is specified:

The template returns the description for the page language as determined by the page's prefix - e.g FR = french if available.
If not available, english is returned
If there is no description for english, no description found is returned

Examples

tag (Q2)
{{Desc|Q2|}} on an EN page → Combination of a key and a value, e.g. place=city.
{{Desc|Q2|}} on an FR page → Classe des attributs. Les attributs sont la combinaison d'une clé et d'une valeur, par exemple « place=city ».
{{Desc|Q2|en}} on any page → Combination of a key and a value, e.g. place=city.
{{Desc|Q2|fr}} on any page → Classe des attributs. Les attributs sont la combinaison d'une clé et d'une valeur, par exemple « place=city ».
bridge:movable=bascule (Q888)
{{Desc|Q888}} on an EN page → A type of movable bridge, a bascule bridge contains one or two spans, one end of which is free and swings upwards. A counterweight at the pivoting end of the span or spans balances the weight as the free end rises.
{{Desc|Q888}} on a PL page → Most zwodzony.
{{Desc|Q888|en}} on any page → A type of movable bridge, a bascule bridge contains one or two spans, one end of which is free and swings upwards. A counterweight at the pivoting end of the span or spans balances the weight as the free end rises.
{{Desc|Q888|pl}} on any page → Most zwodzony.
Shape_Area (Q1001)
{{Desc|Q1001}}


Returns the description for a particular WikiBase item, using Module:OSMWikiBase.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
entity ID1

no description

Example
Q1001
Stringrequired
language code2

If specified: The template returns the description for that language if available. If not available, English is returned. If there is no description for English, ''no description found'' is returned. – If not specified: The template returns the description for the page language as determined by the page's prefix—e.g. FR = French—if available. If not available, English is returned. If there is no description for English, ''no description found'' is returned.

Example
fr
Stringoptional