This is for use in templates. For articles, please use {{Convert}} or {{Height}}.
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template is used to automatically add conversions of height measurements displayed by Template:Infobox person and other infoboxes with a |height= parameter.
Error: expandTemplate: template "Infobox person/height/sandbox" does not exist
Exceptions
Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
|height=5 feet 2 inches (1.00 metres) → 5 ft 2 in (1.00 m)
|height=5 feet 2 inches (100 centimetres) → 5 ft 2 in (100 cm)
|height=1.57 metres (5 feet 5 inches) → 1.57 m (5 ft 5 in)
|height=157 centimetres (5 feet 5 inches) → 157 cm (5 ft 5 in)
Does not replace numeric output of conversion templates such as {{convert}} or {{height}}, but does replace unit names with abbreviations (examples intentionally show different precision than usual):
|height={{Convert|5|ft|2|in|m|3|abbr=off}} → 5 ft 2 in (1.575 m)
output of convert template: 5 feet 2 inches (1.575 metres)
|height={{Convert|5|ft|2|in|cm|sigfig=4|abbr=off}} → 5 ft 2 in (157.5 cm)
output of convert template: 5 feet 2 inches (157.5 centimetres)
|height={{Convert|1.57|m|ftin|1|abbr=off}} → 1.57 m (5 ft 1.8 in)
output of convert template: 1.57 metres (5 feet 1.8 inches)
|height={{Convert|157|cm|ftin|1|abbr=off}} → 157 cm (5 ft 1.8 in)
output of convert template: 157 centimetres (5 feet 1.8 inches)
|height={{Height|m=1.57|frac=4|abbr=no}} →
output of height template:
|height={{Height|cm=157|frac=4|abbr=no}} →
output of height template:
Areas for improvement
Conversion not displayed if unit name contains uppercase characters:
|height=157 Centimetres → 157 Centim
|height=157 CM → 157 CM
|height=1.57 Metres → 1.57 Metres
|height=1.57 M → 1.57 M
|height=5 Feet 2 Inches → 5 Feet 2 Inches
|height=5 FT 2 IN → 5 FT 2 IN
Conversion not displayed if symbols are used for feet and inches:
|height=5' 2" → 5' 2"
|height=5′ 2″ → 5′ 2″
Does not recognize symbols for feet and inches in a manually entered conversion (adds a second conversion):
|height=157cm (5' 2") → 157 cm (5 ft 2 in) (5' 2")
|height=1.57m (5′ 2″) → 1.57 m (5 ft 2 in) (5′ 2″)