Jump to content

User:Wikid77/Template:Htbot

From Wikipedia, the free encyclopedia
The Template:Htbot simply compares the given height to some common-sense levels of height, and then auto-formats the height in feet, with inches, .x, or rounded whole feet. Usage:
{{htbot|xxx.x}}
{{htbot|m=xxx.x}}
{{htbot|1.2}} - for 1.2 meters.
{{htbot|5300}} - for 5300 meters.
{{htbot|5|abbr=off}} - show "feet".
Options include: abbr=off, sp=us, disp=/, disp=or, adj=on (explained below).

The height levels for choosing format are based on meters (m):

m < 6: shows feet & inches
m < 50: shows feet to 1 decimal, xxx.x
m > 50: shows feet rounded to whole feet.

The parameter "m" defaults to the first unnamed parameter. For example:

{{htbot|abbr=no|34}} - uses "34"

Parameters:

  • Parameter 1 is meters (or m=), can contain commas.
  • abbr=off - turns off abbreviation, shows "meters" or "feet" (default: abbr=on).
  • sp=us - triggers U.S. spelling, shows "meters" else "metres" (default: sp=en).
  • disp=/   - displays slash between numbers (default: disp=b).
  • disp=or - displays "or" between numbers (default: parentheses).
  • adj=on - turns on adjective-mode, shows "-m" (default: adj=off).

Those parameters are the same as in template {{Convert}}.

NOTE: When translating articles from German Wikipedia, use template htbot
to handle the German template {{Height|x}}.