Template:Az:Tag

From OpenStreetMap Wiki
Jump to: navigation, search
[Edit] [Octicons-sync.svgpurge Help translate this into Azerbaijani!] Template-info.svg Template documentation

This template is used to represent an OpenStreetMap data key or key/value pair. Elements of the content are automatically linked to appropriate wiki pages.

Usage

The template can be used in a wide variety of ways. The simplest and most common usages are:

Description Example wikitext Result
A single key {{Tag|highway}} highway=*
A specific key/value pair {{Tag|highway|residential}} highway=residential
A key with a generic, literal value (not hyperlinked) {{Tag|bridge||yes}} bridge=yes
A key with a description of value {{Tag|ref||''ref number''}} ref=ref number

Multipart keys

Some key names can have multiple parts, often associated with key namespaces. One such example is keys associated with addresses: key addr:housenumber=* is used to specify a house number, addr:street=* is used to specify a name of a street, and so on. This template provides a choice of various approaches as to how the various parts of a multipart key are formatted: while the text itself remains the same, how the parts are linked differs.

  • single link to subkey page
    This approach treats the compound key as a single entity, and links to the wiki page describing that compound key.
    {{Tag|building:fireproof}}
    produces a single link to the Key:building:fireproof wiki page, like so:
    building:fireproof=*
    This approach is most useful where a compound key is described on its own page, such as Key:building:fireproof or Key:addr:flats.
  • single link to main key page: The following wikitext:
    {{Tag|addr|subkey=housenumber}}
    produces a single link to the main Key:addr wiki page, like so:
    addr:housenumber=*
    This approach is most useful where a collection of subkeys is described on the wiki page of the main key itself, such as Key:addr.

Multiple values

Some keys can have multiple values specified, with each separated by a semicolon. Up to two additional values may be specified with this template, like so:

Example wikitext Result
{{Tag|motor_vehicle|agriculture|;=forestry}} motor_vehicle=agriculture;forestry
{{Tag|motor_vehicle|agriculture|;=forestry|;;=destination}} access=agriculture;forestry;destination

Default target links to external sites for the values of specific keys

Some keys like wikipedia=*, wikidata=* or website=* may create external links, in that case their value in parameter 3 will be displayed (instead of just displaying an asterisk) along with their specific link according to their value; however when the value is the full URL of a website, unlike other tag values (that are generally short), that value is allowed to wrap when it is too long to fit on a line (this avoids making columns in feature tables to exceed a reasonnable maximum width).

Only a few keys recognize this feature:

Example wikitext Result
{{Tag|wikipedia||fr:Paris}} wikipedia=fr:Paris
{{Tag|wikipedia|subkey=fr||Paris}} wikipedia:fr=Paris
{{Tag|wikipedia|subkey=en||Paris}} wikipedia:en=Paris
{{Tag|wikidata||Q90}} wikidata=Q90
{{Tag|website||http://www.paris.fr/}} website=http://www.paris.fr/

For all other keys, the 3rd parameter is just displayed as is, without trying to convert them to new external links. This feature is also not used when the value is specified in the 2nd parameter (where it is used to generate internal links, if possible).

Linking to non-English pages

While the default action for the template is to link to English language pages, it is possible to specify that a different language be used. The kl parameter is used to specify the language of the target of the key link, and the vl to specify the language of the value link. In each case, a standard language code is used.

Where a key contains multiple parts which are linked separately, the kl: and kl:: parameters specify the language for the second and third links, respectively. Where a value contains multiple parts, the vl2 parameter specifies the language for the second link.

The following examples illustrates this.

Example wikitext Result
{{Tag|kl=DE|highway|motorway}} highway=motorway
{{Tag|highway|vl=DE|motorway}} highway=motorway
{{Tag|highway|motorway|kl=DE|vl=DE}} highway=motorway
{{Tag|cycleway|:=right|::=smoothness|excellent|kl=de|kl:=de|kl::=de|vl=de}} cycleway:right:smoothness=excellent

See also

Dəstəklənən dillər — Tag
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
Başqa dillərdə — Bizə bu Viki-ni Tərcümə etməkdə kömək edin