Шаблон:Place

Матеріал з База знань «Управління публічним інвестуванням»
Версія від 11:06, 5 жовтня 2021, створена Regionet (обговорення | внесок) (Створена сторінка: <noinclude><!-- Please update any other language template if you alter this one. --></noinclude>{|class="vcard" style="margin:2px 0.5em;{{Dir|lang={{{lang|}}}|r...)
(різн.) ← Попередня версія | Поточна версія (різн.) | Новіша версія → (різн.)
Перейти до навігації Перейти до пошуку
VTE
24px {{{name}}}, {{{area}}}
{{#invoke:LangSwitch|langSwitch}}{{{lat}}}{{#invoke:LangSwitch|langSwitch}}{{{lon}}}
langSwitch}} {{#invoke:LangSwitch|langSwitch}}, {{#invoke:LangSwitch|langSwitch}}]
langSwitch}}]
  • [[:Category:Users in {{{name}}}|{{#invoke:LangSwitch|langSwitch}}]]
  • {{#invoke:LangSwitch|langSwitch}}
  • {{#invoke:LangSwitch|langSwitch}}
  • {{#invoke:LangSwitch|langSwitch}}
langSwitch}}
[[{{#invoke:LangSwitch|langSwitch}}|{{#invoke:LangSwitch|langSwitch}}]]

{{#invoke:LangSwitch|langSwitch}}

[Редагувати] [10px⧼purge-purge⧽] 50px Template documentation

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]].

Parameters[ред.]

The following parameters can be used in the template:

Parameter
name
Required Purpose
lang No 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).
name Yes The name of the place being referred to (eg. Nottingham). This name is used to lookup category names (it may contain a disambiguating precision).
fullname No 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.
nativename No Native nominative name(s) in original spelling(s), displayed in the box below the name. If not set, nothing else will be displayed.
in-name No 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).
of-name No 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).
catname No 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.
sortkey No The sortkey for categories. If sortkey is not supplied, the 'name' of the place will be used as the sortkey.
type Yes The type of place (preferably in English as a singular noun, case is not significant). Recognised 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); independantly 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.
subarea2 No A secondary subarea (for example, a county name) of the specified 'subarea'. Not used if there's no 'subarea' field specified.
subarea No 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'.
area Yes The area the place is in (usually a country name, for example China, or a continent name when describing a country)
lat Yes 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).
lon or long Yes 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).
zoom No The zoom level to open linked maps at. Default value is 12.
image No The title of the image to display. No image will be display if image is not defined
map No "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".
list No URL of a mailing list for the place. If left blank, no link will appear.
archive No URL of an archive page for the place. If left blank, no link will appear.
forum No URL of a forum page for the place. If left blank, no link will appear.
wikipedia No deprecated - use en.wikipedia instead.
en.wikipedia No The article name on en.wikipedia.org (in English). Default value is name
ar.wikipedia No The article name on ar.wikipedia.org (in Arabic)
bg.wikipedia No The article name on bg.wikipedia.org (in Bulgarian)
bn.wikipedia No The article name on bn.wikipedia.org (in Bengali)
ca.wikipedia No The article name on ca.wikipedia.org (in Catalan)
cs.wikipedia No The article name on cs.wikipedia.org (in Czech)
de.wikipedia No The article name on de.wikipedia.org (in German)
el.wikipedia No The article name on el.wikipedia.org (in Greek)
eo.wikipedia No The article name on el.wikipedia.org (in Esperanto)
es.wikipedia No The article name on es.wikipedia.org (in Spanish)
fa.wikipedia No The article name on fa.wikipedia.org (in Persan/Farsi)
fi.wikipedia No The article name on fa.wikipedia.org (in Finnish)
fr.wikipedia No The article name on fr.wikipedia.org (in French)
gl.wikipedia No The article name on gl.wikipedia.org (in Galician)
he.wikipedia No The article name on he.wikipedia.org (in Hebrew)
hi.wikipedia No The article name on he.wikipedia.org (in Hindi)
hr.wikipedia No The article name on hr.wikipedia.org (in Croatian)
hu.wikipedia No The article name on hu.wikipedia.org (in Hungarian)
id.wikipedia No The article name on id.wikipedia.org (in Indonesian)
it.wikipedia No The article name on it.wikipedia.org (in Italian)
ja.wikipedia No The article name on ja.wikipedia.org (in Japanese)
ka.wikipedia No The article name on ka.wikipedia.org (in Georgian)
kk.wikipedia No The article name on kk.wikipedia.org (in Kazakh)
ko.wikipedia No The article name on ko.wikipedia.org (in Korean)
mg.wikipedia No The article name on mg.wikipedia.org (in Malagasy)
mk.wikipedia No The article name on mk.wikipedia.org (in Macedonian)
ml.wikipedia No The article name on ml.wikipedia.org (in Malalayam)
ne.wikipedia No The article name on ne.wikipedia.org (in Nepalese)
nl.wikipedia No The article name on nl.wikipedia.org (in Dutch)
no.wikipedia No The article name on no.wikipedia.org (in Norwegian Bokmal)
or.wikipedia No The article name on or.wikipedia.org (in Orya)
pl.wikipedia No The article name on pl.wikipedia.org (in Polish)
pt.wikipedia No The article name on pt.wikipedia.org (in Portuguese)
ro.wikipedia No The article name on ro.wikipedia.org (in Romanian)
ru.wikipedia No The article name on ru.wikipedia.org (in Russian)
sk.wikipedia No The article name on sk.wikipedia.org (in Slovakian)
sl.wikipedia No The article name on sl.wikipedia.org (in Slovenian)
sq.wikipedia No The article name on sq.wikipedia.org (in Albanian)
sr.wikipedia No The article name on sr.wikipedia.org (in Serbian)
sv.wikipedia No The article name on sv.wikipedia.org (in Swedish)
ta.wikipedia No The article name on ta.wikipedia.org (in Tamil)
te.wikipedia No The article name on te.wikipedia.org (in Telugu)
th.wikipedia No The article name on tr.wikipedia.org (in Thai)
tr.wikipedia No The article name on tr.wikipedia.org (in Turkish)
uk.wikipedia No The article name on uk.wikipedia.org (in Ukrainian)
ur.wikipedia No The article name on ur.wikipedia.org (in Urdu)
vi.wikipedia No The article name on vi.wikipedia.org (in Vietnamese)
zh.wikipedia No The article name on zh.wikipedia.org (in Chinese)
wikidata No The item id (Qnnn) on wikidata.org
latlon No "Yes" if you would like to add link to LatLon.org public transport render.
BestOfOSM No Inscription in BestOfOSM.org possibles values are : BestOf/ Interesting/ Import/ Historic, categorize the page in the relevant category
krdb No 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.

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[ред.]

{{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
24px Reading, Berkshire, England, United Kingdom
{{#invoke:LangSwitch|langSwitch}}51.445{{#invoke:LangSwitch|langSwitch}}-0.9685
langSwitch}} {{#invoke:LangSwitch|langSwitch}}, {{#invoke:LangSwitch|langSwitch}}]
langSwitch}}]
langSwitch}}
[[{{#invoke:LangSwitch|langSwitch}}|{{#invoke:LangSwitch|langSwitch}}]]

{{#invoke:LangSwitch|langSwitch}}

{{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
24px Los Angeles, California, United States
{{#invoke:LangSwitch|langSwitch}}34.0214{{#invoke:LangSwitch|langSwitch}}-118.4120
langSwitch}} {{#invoke:LangSwitch|langSwitch}}, {{#invoke:LangSwitch|langSwitch}}]
langSwitch}}]
langSwitch}}
[[{{#invoke:LangSwitch|langSwitch}}|{{#invoke:LangSwitch|langSwitch}}]]
{{#invoke:LangSwitch|langSwitch}}

Завантаження карти…

{{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
24px The Western Development Region, Nepal
पश्चिमाञ्चल विकास क्षेत्र
Pashchimānchal Bikās Kshetra
{{#invoke:LangSwitch|langSwitch}}28.335{{#invoke:LangSwitch|langSwitch}}83.947
langSwitch}} {{#invoke:LangSwitch|langSwitch}}, {{#invoke:LangSwitch|langSwitch}}]
langSwitch}}]
langSwitch}}
[[{{#invoke:LangSwitch|langSwitch}}|{{#invoke:LangSwitch|langSwitch}}]]
{{#invoke:LangSwitch|langSwitch}}

Завантаження карти…

{{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.


[[Шаблон:LL]] [[Шаблон:LL]]