Template:Place/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

Summary

Template:Place is a template to place details of a place on to the wiki page with the language set by the parameter "lang" or in the language of the current page returned by {{Langcode}} (this language code is determined by the namespace for DE,ES,FR,IT,JA,NL,RU or by the pagename prefix otherwise). Autotranslation is supported (see {{PlaceLang}}) but there are still specialized versions of this template.

The template places a text description in the page itself, and a box on the right with links to further details on the place. There are options for a slippy map centred on the left, and a static image in the box on the right.

The template puts the article in the correct categories: [[Category:Types in subarea]] and/or [[Category:Types in area]] and [[Category:name]] (if the category name exists) so there is no need to do that manually.

One does need to manually put the categories like [[Category:Types in subarea]] into categories like [[Category:Types in area|subarea]] and also into [[Category:subarea]], as well as placing [[Category:name]] into [[Category:Types in subarea]] and/or [[Category:Types in area]].

TemplateData

Template:Place is a template to describe details of a place

Template parameters

ParameterDescriptionTypeStatus
namename

The name of the place being referred to (eg. Nottingham). This name is used to lookup category names (it may contain a disambiguating precision).

Stringrequired
langlang

The two character language code for the results to be returned. Default is the language code determined by {{Langcode}} from the namespace or prefix of the current page name (which will be assumed to be 'en' if there's none).

Stringoptional
fullnamefullname

An alternate full name to display on the page (adding an article, or removing the disambiguating precision). If not set, the name parameter will be used.

Stringoptional
nativenamenativename

Native nominative name(s) in original spelling(s), displayed in the box below the name. If not set, nothing else will be displayed.

Stringoptional
in-namein-name

An alternate locative name to display on the page (adding an article, or removing the disambiguating precision). If not set, the name parameter will be used as defined in Template:PlaceLang using default rules defined for the native language (with a 'in' preposition or similar).

Stringoptional
of-nameof-name

An alternate genitive name to display on the page (adding an article, or removing the disambiguating precision). If not set, the name parameter will be used as defined in Template:PlaceLang using default rules defined for the native language (with a 'of' preposition or similar).

Stringoptional
catnamecatname

The effective name of the category to use for pages related to that place (without the namespace or language prefix). If not set, a category with the given 'name' (possibly suffixed in its 'subarea2' or 'subarea' or 'area' to disambiguate it) will first be used if it exists; then a category for 'type' in 'subarea2', or 'type' in 'subarea' will be checked; if still not found, the category for 'type' in 'area' will be used otherwise.

Stringoptional
sortkeysortkey

The sortkey for categories. If sortkey is not supplied, the 'name' of the place will be used as the sortkey.

Stringoptional
typetype

The type of place (preferably in English as a singular noun, case is not significant). Recognized values are: village/ city/ ville/ town/ suburb/ hamlet/ hameau/ municipality /metropolitan borough and town/ county/ district/ canton/ kreis/ landkreis/ département/ province/ prefecture/ oblast/ région/ region/ state/ country/ pays/ sovereign state/ continent/ island/ isle. Some synonyms (including a few translated type names for compatibility reasons only) are recognized but they should map to existing types of places listed (with a plural name) in Category:Places, according to {{CategoryInPlaceLang}} (otherwise, unknown types will be categorized only as 'Places in ...' or supported translations); independently of categories, the type is used in the description and more freely translatable in {{PlaceLang}}, which allow all types to be translated easily from English or one of the compatibility synonyms.

Stringrequired
subarea2subarea2

A secondary subarea (for example, a county name) of the specified 'subarea'. Not used if there's no 'subarea' field specified.

Stringoptional
subareasubarea

A subarea (for example, the name of a province of China) of the specified 'area'. It is possible to leave this 'subarea' undefined and just specify the 'area'.

Stringoptional
areaarea

The area the place is in (usually a country name, for example China, or a continent name when describing a country)

Stringrequired
latlat

The WGS84 latitude of the place (between -90.0 and 90.0 in decimal degrees: 0 on the equatorial circle, negative value in the Southern hemisphere).

Numberrequired
lonlon

The WGS84 longitude of the place (between -180.0 and 180.0 in decimal degrees: 0 on the reference meridian passing near Greenwich, negative value in the Western hemisphere).

Numberrequired
zoomzoom

The zoom level to open linked maps at. Default value is 12.

Numberoptional
imageimage

The title of the image to display. No image will be displayed if image is not defined

Stringoptional
mapmap

"Yes" if you would like a slippymap included in the main page (width and height can also be used). No map will be displayed if this field is left blank or set to "No".

Stringoptional
listlist

URL of a mailing list for the place. If left blank, no link will appear.

Stringoptional
archivearchive

URL of an archive page for the place. If left blank, no link will appear.

Stringoptional
forumforum

URL of a forum page for the place. If left blank, no link will appear.

Stringoptional
en.wikipediaen.wikipedia

The article name on en.wikipedia.org (in English). Default value is name

Stringoptional
ar.wikipediaar.wikipedia

The article name on ar.wikipedia.org (in Arabic)

Stringoptional
bg.wikipediabg.wikipedia

The article name on bg.wikipedia.org (in Bulgarian)

Stringoptional
bn.wikipediabn.wikipedia

The article name on bn.wikipedia.org (in Bengali)

Stringoptional
ca.wikipediaca.wikipedia

The article name on ca.wikipedia.org (in Catalan)

Stringoptional
cs.wikipediacs.wikipedia

The article name on cs.wikipedia.org (in Czech)

Stringoptional
de.wikipediade.wikipedia

The article name on de.wikipedia.org (in German)

Stringoptional
el.wikipediael.wikipedia

The article name on el.wikipedia.org (in Greek)

Stringoptional
eo.wikipediaeo.wikipedia

The article name on el.wikipedia.org (in Esperanto)

Stringoptional
es.wikipediaes.wikipedia

The article name on es.wikipedia.org (in Spanish)

Stringoptional
fa.wikipediafa.wikipedia

The article name on fa.wikipedia.org (in Persan/Farsi)

Stringoptional
fi.wikipediafi.wikipedia

The article name on fa.wikipedia.org (in Finnish)

Stringoptional
fr.wikipediafr.wikipedia

The article name on fr.wikipedia.org (in French)

Stringoptional
gl.wikipediagl.wikipedia

The article name on gl.wikipedia.org (in Galician)

Stringoptional
he.wikipediahe.wikipedia

The article name on he.wikipedia.org (in Hebrew)

Stringoptional
hi.wikipediahi.wikipedia

The article name on he.wikipedia.org (in Hindi)

Stringoptional
hr.wikipediahr.wikipedia

The article name on hr.wikipedia.org (in Croatian)

Stringoptional
hu.wikipediahu.wikipedia

The article name on hu.wikipedia.org (in Hungarian)

Stringoptional
id.wikipediaid.wikipedia

The article name on id.wikipedia.org (in Indonesian)

Stringoptional
it.wikipediait.wikipedia

The article name on it.wikipedia.org (in Italian)

Stringoptional
ja.wikipediaja.wikipedia

The article name on ja.wikipedia.org (in Japanese)

Stringoptional
ka.wikipediaka.wikipedia

The article name on ka.wikipedia.org (in Georgian)

Stringoptional
kk.wikipediakk.wikipedia

The article name on kk.wikipedia.org (in Kazakh)

Stringoptional
ko.wikipediako.wikipedia

The article name on ko.wikipedia.org (in Korean)

Stringoptional
mg.wikipediamg.wikipedia

The article name on mg.wikipedia.org (in Malagasy)

Stringoptional
mk.wikipediamk.wikipedia

The article name on mk.wikipedia.org (in Macedonian)

Stringoptional
ml.wikipediaml.wikipedia

The article name on ml.wikipedia.org (in Malalayam)

Stringoptional
ne.wikipediane.wikipedia

The article name on ne.wikipedia.org (in Nepalese)

Stringoptional
nl.wikipedianl.wikipedia

The article name on nl.wikipedia.org (in Dutch)

Stringoptional
no.wikipediano.wikipedia

The article name on no.wikipedia.org (in Norwegian Bokmal)

Stringoptional
or.wikipediaor.wikipedia

The article name on or.wikipedia.org (in Orya)

Stringoptional
pl.wikipediapl.wikipedia

The article name on pl.wikipedia.org (in Polish)

Stringoptional
pt.wikipediapt.wikipedia

The article name on pt.wikipedia.org (in Portuguese)

Stringoptional
ro.wikipediaro.wikipedia

The article name on ro.wikipedia.org (in Romanian)

Stringoptional
ru.wikipediaru.wikipedia

The article name on ru.wikipedia.org (in Russian)

Stringoptional
sk.wikipediask.wikipedia

The article name on sk.wikipedia.org (in Slovakian)

Stringoptional
sl.wikipediasl.wikipedia

The article name on sl.wikipedia.org (in Slovenian)

Stringoptional
sq.wikipediasq.wikipedia

The article name on sq.wikipedia.org (in Albanian)

Stringoptional
sr.wikipediasr.wikipedia

The article name on sr.wikipedia.org (in Serbian)

Stringoptional
sv.wikipediasv.wikipedia

The article name on sv.wikipedia.org (in Swedish)

Stringoptional
ta.wikipediata.wikipedia

The article name on ta.wikipedia.org (in Tamil)

Stringoptional
te.wikipediate.wikipedia

The article name on te.wikipedia.org (in Telugu)

Stringoptional
th.wikipediath.wikipedia

The article name on tr.wikipedia.org (in Thai)

Stringoptional
tr.wikipediatr.wikipedia

The article name on tr.wikipedia.org (in Turkish)

Stringoptional
uk.wikipediauk.wikipedia

The article name on uk.wikipedia.org (in Ukrainian)

Stringoptional
ur.wikipediaur.wikipedia

The article name on ur.wikipedia.org (in Urdu)

Stringoptional
vi.wikipediavi.wikipedia

The article name on vi.wikipedia.org (in Vietnamese)

Stringoptional
zh.wikipediazh.wikipedia

The article name on zh.wikipedia.org (in Chinese)

Stringoptional
wikidatawikidata

The item id (Qnnn) on wikidata.org

Stringoptional
latlonlatlon

"Yes" if you would like to add link to LatLon.org public transport render.

Stringoptional
BestOfOSMBestOfOSM

Inscription in BestOfOSM.org possible values are: BestOf/ Interesting/ Import/ Historic, categorize the page in the relevant category

Stringoptional
krdbkrdb

The database to use in the Keep Right link (CA: Canada; US: USA; XG: Central America and Caribbean; XC: South America; XA: Africa; EU: Europe; XD: Asia; AU: Australasia and Oceania). Default value is EU. See Template:Keepright for details.

Stringoptional
includeinclude

no description

Unknownoptional
longlong

The WGS84 longitude of the place (between -180.0 and 180.0 in decimal degrees: 0 on the reference meridian passing near Greenwich, negative value in the Western hemisphere).

Unknownoptional
osmoseosmose

no description

Unknownoptional
wikipediawikipedia

no description

Unknowndeprecated
widthwidth

no description

Unknownoptional
heightheight

no description

Unknownoptional
layerlayer

no description

Unknownoptional
nocatnocat

no description

Unknownoptional

Categories

If there is a category for the name of the place (e.g. New York) then this category is added to the page.

The template will add the place to a category types in subarea (e.g. Cities in Berkshire).

If the subarea is not defined, the template will also add the place to the category types in area (eg. Cities in UK). This increases the chance the place will be allocated to a category that exists, but ensures that if a more specific category exists it isn't allocated to the parent category.

Usage

Full template

{{Place
|lang        =xx          (two character language code, default is from {{Langcode}})
|name        =name
|nativename  =native name        (optional)
|in-name     =in the native name (optional, see [[Template:PlaceLang]])
|of-name     =of the native name (optional, see [[Template:PlaceLang]])
|type        =something   (village/city/ville/town/suburb/hamlet/hameau...
                           municipality/metropolitan borough and town...
                           county/district/canton/kreis/landkreis/département...
                           province/prefecture/oblast/région/region/state...
                           country/pays/sovereign state...
                           continent/island/isle)
|subarea2    =text        (optional, name of a secondary subdivision of the following subarea)
|subarea     =text        (optional, usually province, prefecture or state name)
|area        =text        (usually country name, or continent when describing countries)
|lat         =number, +/- (latitude of the place)
|long        =number, +/- (longitude of the place)
|zoom        =number 1-17 (optional, The zoom level to open linked 
                           to maps at. Default value is 12. )
|image       =image.png   (optional, image in box)
|image caption = text     (optional, description of the image in box)
|map         =Yes         (optional, slippymap included in the main page)
|width       =# of pixels (optional, width of slippymap, default is equal to the text width)
|height      =# of pixels (optional, width of slippymap, default is 400)
|layer       =layer       (optional, layer of slippymap, default is mapnik, documentation at [[Wiki:Maps]])
|latlon      =Yes         (optional, to add link to LatLon.org 
                           public transport render.)
|sortkey     =text        (optional, If sortkey is not supplied the 
                           name of the place will be used as the sortkey.)
|list        =URL         (optional, mailing list page for the place.)
|archive     =URL         (optional, archive page for the place)
|forum       =URL         (optional, forum page for the place)
|en.wikipedia=text        (optional, article name on en.wikipedia.org, 
                           default value is 'name')
|de.wikipedia=text        (optional, article name on de.wikipedia.org)
|es.wikipedia=text        (optional, article name on es.wikipedia.org)
|fr.wikipedia=text        (optional, article name on fr.wikipedia.org)
|it.wikipedia=text        (optional, article name on it.wikipedia.org)
|ja.wikipedia=text        (optional, article name on ja.wikipedia.org)
|nl.wikipedia=text        (optional, article name on nl.wikipedia.org)
|pt.wikipedia=text        (optional, article name on ja.wikipedia.org)
|ru.wikipedia=text        (optional, article name on ru.wikipedia.org)
|uk.wikipedia=text        (optional, article name on uk.wikipedia.org)
|wikidata    =Qnnn        (optional, element id on wikidata.org)
|BestOfOSM   =text        (optional, possibles values are: 
                           BestOf/ Interesting/ Import/ Historic)
|krdb        =text        (optional, database to use in the 'Keep Right' link. Default
                           value is EU. See [[Template:Keepright]] for details.)
}}

Blank template with required fields only

{{Place
|name = 
|type = 
|area = 
|lat  = 
|long = 
}}

Blank template with most available fields

{{Place|lang=en
|name        = 
|type        = 
|subarea2    = 
|subarea     = 
|area        = 
|lat         = 
|long        = 
|zoom        = 12
|image       = 
|map         = 
|width       = 
|height      = 
|layer       = 
|sortkey     = 
|list        = 
|archive     = 
|forum       = 
|de.wikipedia= 
|en.wikipedia= 
|es.wikipedia= 
|fr.wikipedia= 
|it.wikipedia= 
|ja.wikipedia= 
|ru.wikipedia= 
|uk.wikipedia= 
|wikidata    = 
|latlon      = 
|BestOfOSM   = 
|krdb        = 
}}

Example - UK town (no slippy map displayed, static image used instead)

VTE
Reading, Berkshire, England, United Kingdom
Wikidata

latitude: 51.445, longitude: -0.9685
Browse map of Reading 51°26′42.00″ N, 0°58′06.60″ W
Edit map
Reading
External links:
Use this template for your locality

Reading is a town in Berkshire, England, United Kingdom at latitude 51°26′42.00″ North, longitude 0°58′06.60″ West.

{{Place|lang=en
|name        = Reading
|type        = town
|subarea2    = Berkshire
|subarea     = England
|area        = United Kingdom
|lat         = 51.445
|long        = -0.9685
|zoom        = 11
|image       = File:UK Reading status.png
|wikidata=Q161491
}}

Example - US city (no static image, but using a slippy map below the description)

VTE
Los Angeles, California, United States
Wikidata

latitude: 34.0214, longitude: -118.4120
Browse map of Los Angeles 34°01′17.04″ N, 118°24′43.20″ W
Edit map
External links:
Use this template for your locality

Los Angeles is a city in California, United States at latitude 34°01′17.04″ North, longitude 118°24′43.20″ West.

{{Place|lang=en
|name        = Los Angeles
|type        = city
|subarea     = California
|area        = United States
|lat=34.0214|long=-118.4120
|map=yes|zoom=10|width=380|height=560
}}

Example - Nepal Region (no subarea, alternative image, and map used below the description)

VTE
The Western Development Region, Nepal
Wikidata

पश्चिमाञ्चल विकास क्षेत्र
Pashchimānchal Bikās Kshetra
latitude: 28.335, longitude: 83.947
Browse map of the Western Development Region 28°20′06.00″ N, 83°56′49.20″ E
Edit map
Location map of subdivisions of Nepal
External links:
Use this template for your locality

The Western Development Region is a region in Nepal at latitude 28°20′06.00″ North, longitude 83°56′49.20″ East.

{{Place|lang=en
|name=Western Development Region
|nativename=पश्चिमाञ्चल विकास क्षेत्र<br />''Pashchimānchal Bikās Kshetra''
|fullname=The Western Development Region
|in-name=in the Western Development Region
|of-name=of the Western Development Region
|type=region
|area=Nepal
|image=File:Subdivisions of Nepal EN.png
|image caption=Location map of subdivisions of Nepal
|forum=https://forum.openstreetmap.org/viewforum.php?id=81 OpenStreetMap users: Nepal
|lat=28.335|long=83.947
|map=slippy|zoom=8|width=480|height=430
|krdb=XD
|en.wikipedia=Western Development Region, Nepal
|de.wikipedia=Entwicklungsregion West (Nepal)
|pl.wikipedia=Western Development Region
|wikidata=Q28462
}}

See also

  • {{PlaceLang}} – Used internally to translate most texts displayed by the current template.
  • {{CategoryInPlaceLang}} – Used internally to adapt the translated category names (warning! they must first be created separately, do not translate them blindly !)
  • {{Country}} – Larger template including this one, with an additional top banner intended for places that are countries.