टेम्पलेट:Infobox settlement/pref
Appearance
टेम्पलेट बिबरनलेख[देखीं] [संपादन करीं] [इतिहास देखीं] [रिफ्रेश करीं]
This is a subtemplate of {{Infobox settlement}}. It is not intended to be used directly. It is called by the following templates:
Its purpose is to determine whether those templates call one of the subtemplates that displays metric units first (the default):
or one of the subtemplates that displays imperial units (U.S. units) first:
or the following subtemplates if an area is specified in dunams:
Usage
The template handles up to three unnamed parameters.
- Text which specifies preference to display either metric or Imperial units first. It is specified as
unit_pref
in{{Infobox settlement}}
, then passed aspref
to one of three display subtemplates (/areadisp, /densdisp, /lengthdisp
). - Country name, used to determine preferene when not given in first parameter. It is specified as
subdivision_name
in{{Infobox settlement}}
, then passed asname
to one of three display subtemplates. - The third parameter is only specified by the
/areadisp
subtemplate, which passes the textarea
.
The default is to display metric units first, so the template only checks these parameters for values that would indicate the need to display non-metric units first:
Imperial, English, UK, US, U.S., US Customary, U.S. Customary, Standard
United Kingdom, [[United Kingdom]], United States, [[United States]], United States of America, [[United States of America]], [[United States|United States of America]]
- if this template is called by the
/areadisp
subtemplate, then it also checks parameter #1 fordunam
(after converting it to lowercase)
Examples
Code | Result |
---|---|
{{Infobox settlement/pref | | }}
|
metric |
{{Infobox settlement/pref | Imperial | }}
|
impus |
{{Infobox settlement/pref | UK | }}
|
impus |
{{Infobox settlement/pref | US | }}
|
impus |
{{Infobox settlement/pref | | United Kingdom}}
|
impus |
{{Infobox settlement/pref | | United States}}
|
impus |
{{Infobox settlement/pref|Dunam|Other|area}}
|
dunam |
{{Infobox settlement/pref|Dunam|Other}}
|
metric |
{{Infobox settlement/pref|Dunam|United Kingdom|area}} In this example, the template never checks for "Dunam" because it previously found that parameter #2 contained the name of a country using imperial units. |
impus |
See also
- {{Infobox settlement/areadisp}}
- {{Infobox settlement/lengthdisp}}
- {{Infobox settlement/link}}
- {{Infobox settlement cleaner}}
परिचय खातिर ऊपर दिहल गइल बिबरनलेख के टेम्पलेट:Infobox settlement/pref/doc से ट्रांसक्लूड क के इहाँ देखावल जा रहल बाटे। (संपादन करीं | इतिहास देखीं) संपादक लोग एह टेम्पलेट के अभ्यासपन्ना (सैंडबाक्स) (बनाईं | मिरर करीं) आ टेस्टकेस (बनाईं) पन्ना सभ पर अभ्यास आ प्रयोग (टेस्टिंग) क सकत बाटे। अनुरोध बा कि अगर श्रेणी जोड़े के होखे तब /doc उपपन्ना (सबपेज) पर जोड़ल जाय। एह टेम्पलेट के उपपन्ना (सबपेज) देखीं। |