ढाँचा:Convinfobox/कागजात

विकिपिडिया, एक स्वतन्त्र विश्वकोशबाट

This template is a frontend for {{convert}}. It is intended as a meta-template for use within the code for a template, where the input is not known a priori. For unit conversions within articles, one should use {{convert}} directly.

This template accepts from four to seven unnamed parameters. Odd parameters must be numerical (or empty) and specify the numerical value of a measurement and the intended precision of the conversion. Even parameters must be unit codes as used in {{convert}}. Named parameters are the same as used by {{convert}}.

This template differs from {{convert}} in the following respects.

  • The units to convert to and the units to convert from must be specified (therefore there are no default convert-to units).
  • Fields for the numerical value of a measurement may be left blank.
  • The default is to abbreviate units (where abbreviations exist).
  • Range conversions are not available.

This template may be used when it is unknown in which direction the conversion is to be made. The direction is determined as shown in the following examples.

  • {{convinfobox|100|m2||sqft}} → १०० मी2 (१,१०० वर्ग फिट)
  • {{convinfobox||m2|100|sqft}} → १०० वर्ग फिट (९.३ मी2)

Dual conversions[सम्पादन गर्नुहोस्]

Dual conversions may be performed by adding a fifth (possibly blank) and sixth unnamed parameter.

  • {{convinfobox|375|ml||impoz||USoz}} → ३७५ मिलीलि (१३.२ इम्प॰ फ्ल्यु॰ आउन्स; १२.७ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox||ml|40|impoz||USoz}} → ४० इम्प॰ फ्ल्यु॰ आउन्स (१,१०० मिलीलि; ३८ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox||ml||impoz|32|USoz}} → ३२ यूएस फ्ल्यु॰ आउन्स (९५० मिलीलि; ३३ इम्प॰ फ्ल्यु॰ आउन्स)

Paired units[सम्पादन गर्नुहोस्]

Length may be expressed in feet and inches.

  • {{convinfobox|180|cm||ft||in}} → १८० सेमी (५ फिट ११ इन्च)
  • {{convinfobox||cm|5|ft||in}} → ५ फिट (१५० सेमी)
  • {{convinfobox||cm||ft|120|in}} → १२० इन्च (३०० सेमी)
  • {{convinfobox||cm|5|ft|6|in}} → ५ फिट ६ इन्च (१६८ सेमी)
  • {{convinfobox||ft||in|180|cm}} → १८० सेमी (५ फिट ११ इन्च)
  • {{convinfobox|5|ft||in||cm}} → ५ फिट ० इन्च (१५२ सेमी)
  • {{convinfobox||ft|120|in||cm}} → १२० इन्च (३०० सेमी)
  • {{convinfobox|5|ft|6|in||cm}} → ५ फिट ६ इन्च (१६८ सेमी)

Similarly, mass may be expressed in pounds and ounces.

  • {{convinfobox|8.5|kg||lb||oz}} → ८.५ किग्रा (१८ पाउन्ड १२ औंस)
  • {{convinfobox||kg|4|lb|3|oz}} → ४ पाउन्ड ३ औंस (१.९ किग्रा)

Mass may also be expressed in stone and pounds.

  • {{convinfobox|65|kg||st||lb}} → ६५ किग्रा (१४३ पाउन्ड; १० स्टोन ३ पाउन्ड)
  • {{convinfobox||kg|10|st||lb}} → १० स्टोन ० पाउन्ड (६४ किग्रा; १४० पाउन्ड)
  • {{convinfobox||kg|10|st|7|lb}} → १० स्टोन ७ पाउन्ड (६७ किग्रा; १४७ पाउन्ड)
  • {{convinfobox||kg||st|145|lb}} → १४५ पाउन्ड (६६ किग्रा; १० स्टोन ५ पाउन्ड)

Specifying more than one value[सम्पादन गर्नुहोस्]

The template currently bases conversions on the first non-blank numerical value ignoring any secondary or tertiary values.

  • {{convinfobox|100|m2|100|sqft}} → १०० मी2 (१,१०० वर्ग फिट)
  • {{convinfobox|375|ml|40|impoz||USoz}} → ३७५ मिलीलि (१३.२ इम्प॰ फ्ल्यु॰ आउन्स; १२.७ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox|375|ml||impoz|32|USoz}} → ३७५ मिलीलि (१३.२ इम्प॰ फ्ल्यु॰ आउन्स; १२.७ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox||ml|40|impoz|32|USoz}} → ४० इम्प॰ फ्ल्यु॰ आउन्स (१,१०० मिलीलि; ३८ यूएस फ्ल्यु॰ आउन्स)

Rounding[सम्पादन गर्नुहोस्]

As with {{convert}} rounding can be done automatically or manually by specifying the precision and/or number of significant figures in the converted value. The number of significant figures can be determined by the parameter |sigfig=. The precision can be determined by the fifth (if there is no sixth) or seventh (if there is a sixth) unnamed parameter as shown in the examples below.

  • {{convinfobox|100|m2||sqft|4}} → १०० मी2 (१,०७६.३९१० वर्ग फिट)
  • {{convinfobox|100|m2||sqft|sigfig=4}} → १०० मी2 (१,०७६ वर्ग फिट)
  • {{convinfobox||ml|40|impoz||USoz|2}} → ४० इम्प॰ फ्ल्यु॰ आउन्स (१,१३६.५२ मिलीलि; ३८.४३ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox||ml|40|impoz||USoz|sigfig=3}} → ४० इम्प॰ फ्ल्यु॰ आउन्स (१,१४० मिलीलि; ३८.४ यूएस फ्ल्यु॰ आउन्स)
  • {{convinfobox||kg|10|st|7|lb|3}} → १० स्टोन ७ पाउन्ड (६६.६७८ किग्रा; १४७.००० पाउन्ड)
  • {{convinfobox||kg|10|st|7|lb|sigfig=5}} → १० स्टोन ७ पाउन्ड (६६.६७८ किग्रा; १४७.०० पाउन्ड)

Specify precision "0" to prevent rounding of values ending in zero:

  • kilograms (kg)
    • with "0": {{convinfobox|110|kg||lb|0}} → ११० किग्रा (२४३ पाउन्ड)
    • without: {{convinfobox|110|kg||lb}} → ११० किग्रा (२४० पाउन्ड)
  • pounds (lb)
    • with "0": {{convinfobox||kg|240|lb|0}} → २४० पाउन्ड (१०९ किग्रा)
    • without: {{convinfobox||kg|240|lb}} → २४० पाउन्ड (११० किग्रा)
  • metres (m)
    • with "0": {{convinfobox|100|m||ft|0}} → १०० मी (३२८ फिट)
    • without: {{convinfobox|100|m||ft}} → १०० मी (३३० फिट)
  • inches (in)
    • with "0": {{convinfobox||cm|100|in|0}} → १०० इन्च (२५४ सेमी)
    • without: {{convinfobox||cm|100|in}} → १०० इन्च (२५० सेमी)

Leaving all numerical fields blank[सम्पादन गर्नुहोस्]

If all numerical value fields are left blank the template returns nothing.

  • {{convinfobox||m2||sqft}}
  • {{convinfobox||ml||impoz||USoz}}

See also[सम्पादन गर्नुहोस्]

Supporting templates
Templates transcluding {{convinfobox}}
सूची