ଛାଞ୍ଚ:Infobox person/length/doc

ଉଇକିପିଡ଼ିଆ‌ରୁ

ଛାଞ୍ଚ:Infobox person/length is one of three templates used to automatically add conversions of length measurements displayed by infoboxes, such as the |reach= parameter in {{Infobox boxer}}.

  1. Template:Infobox person/length changes text for units of length to the abbreviations "cm" or "in", then passes the string to:
  2. Template:Infobox person/length/locate which replaces any instances of   with a space, and determines the positions of "cm" or "in" within that string, all of which is passed to:
  3. Template:Infobox person/length/switch which does the conversion

Usage[ସମ୍ପାଦନା]

cm[ସମ୍ପାଦନା]

  • {{Infobox person/length|1 centimetre}} → 1 cm (0 in)
  • {{Infobox person/length|1 centimeter}} → 1 cm (0 in)
  • {{Infobox person/length|198 centimetres}} → 198 cm (78 in)
  • {{Infobox person/length|198 centimeters}} → 198 cm (78 in)
  • {{Infobox person/length|198 cm}} → 198 cm (78 in)
  • {{Infobox person/length|198 cm.}} → 198 cm (78 in)
  • {{Infobox person/length|198 cms}} → 198 cm (78 in)

in[ସମ୍ପାଦନା]

  • {{Infobox person/length|1 inch}} → 1 in (3 cm)
  • {{Infobox person/length|78 inches}} → 78 in (198 cm)
  • {{Infobox person/length|78 in}} → 78 in (198 cm)
  • {{Infobox person/length|78 in.}} → 78 in (198 cm)
  • {{Infobox person/length|78 ins}} → 78 in (198 cm)

no space or  [ସମ୍ପାଦନା]

  • {{Infobox person/length|198centimetres}} → 198 cm (78 in)
  • {{Infobox person/length|78 inches}} → 78 in (198 cm)

year and reference[ସମ୍ପାଦନା]

  • {{Infobox person/length|198 cms (2012)}} → 198 cm (78 in) (2012)
  • {{Infobox person/length|78 ins (2012)<ref>citation goes here</ref>}} → 78 in (198 cm) (2012)[୧]
  1. citation goes here

conversion templates[ସମ୍ପାଦନା]

  • {{Infobox person/length|{{convert|198|cm|in|0}}}} → 198 cm (78 in)
  • {{Infobox person/length|{{convert|78|in|cm|0}}}} → 78 in (198 cm)

Exceptions[ସମ୍ପାଦନା]

Does not replace numbers in hard-coded conversions (examples intentionally show incorrect conversions), but does replace units with abbreviations "cm or "in":

  • {{Infobox person/length|198 centimetres (71 inches)}} → 198 cm (71 in)
  • {{Infobox person/length|78 inches (191 centimeters)}} → 78 in (191 cm)

Does not replace numeric output of conversion templates such as {{convert}} (examples have precision different than usual), but does replace units with abbreviations "cm or "in":

  • {{Infobox person/length|{{convert|198|cm|in|2|abbr=off}}}} → 198 cm (77.95 in)
    • compare to: {{convert|198|cm|in|2|abbr=off}} → 198 centimetres (77.95 inches)
  • {{Infobox person/length|{{convert|78|in|cm|1|abbr=off|sp=us}}}} → 78 in (198.1 cm)
    • compare to: {{convert|78|in|cm|1|abbr=off|sp=us}} → 78 inches (198.1 centimeters)

Does not recognize {{convert}} template with conversion to metres (adds conversion to centimetres):

  • {{Infobox person/length|{{convert|78|in|m|2|abbr=on}}}} → 78 in (1.98 m)
    • compare to: {{convert|78|in|m|2|abbr=on}} → 78 in (1.98 m)

Does not convert meters/metres (m), feet (ft), yards (yd), etc.:

  • {{Infobox person/length|5 metres}} → 5 m (197 in)
  • {{Infobox person/length|5 meters}} → 5 m (197 in)
  • {{Infobox person/length|5 m}} → 5 m (197 in)
  • {{Infobox person/length|5 feet}} → 5 feet
  • {{Infobox person/length|5 ft}} → 5 ft
  • {{Infobox person/length|5 yards}} → 5 yards
  • {{Infobox person/length|5 yd}} → 5 yd

See also[ସମ୍ପାଦନା]