ᱜᱚᱸᱲᱚᱸ:Convert

ᱣᱤᱠᱤᱯᱤᱰᱤᱭᱟ, ᱨᱟᱲᱟ ᱜᱮᱭᱟᱱ ᱯᱩᱛᱷᱤ ᱠᱷᱚᱱ
Jump to navigation Jump to search

ᱪᱷᱟᱸᱪ:Wikipedia how to Template {{convert}} is used to convert a value from one unit of measurement to another. This page provides an overview of the options available when using the template.

Quick start[ᱥᱟᱯᱲᱟᱣ | ᱯᱷᱮᱰᱟᱛ ᱥᱟᱯᱲᱟᱣ]

By default, the name of the input unit is shown, while the output is abbreviated using the unit's symbol. If wanted, names or symbols can be used, and the output precision can be specified.

  • {{convert|123.4|ft|m}} → 123.4 feet (37.6 m)
  • {{convert|123.4|ft|m|abbr=on}} → 123.4 ft (37.6 m)
  • {{convert|123.4|ft|m|abbr=off}} → 123.4 feet (37.6 metres)
  • {{convert|123.4|ft|m|abbr=off|sp=us}} → 123.4 feet (37.6 meters)
  • {{convert|123.4|ft|m|0}} → 123.4 feet (38 m)
  • {{convert|123.4|ft|m|3}} → 123.4 feet (37.612 m)

Feet and inches can be converted, optionally with fractions.

  • {{convert|12.34|m|ft}} → 12.34 metres (40.5 ft)
  • {{convert|12.34|m|ftin}} → 12.34 metres (40 ft 6 in)
  • {{convert|12.34|m|ftin|frac=4}} → 12.34 metres (40 ft 5 34 in)
  • {{convert|40|ft|6|in|m}} → 40 feet 6 inches (12.34 m)
  • {{convert|5+3/4|in|mm}}5 34 inches (150 mm)
  • {{convert|5+3/4|in|mm|0}}5 34 inches (146 mm)

To avoid overlinking, units are not normally linked, but they can be when needed.

  • {{convert|12300|m2|rood|abbr=off|lk=out}} → 12,300 square metres (12.2 roods)
  • {{convert|12.2|rood|m2|abbr=off|lk=in}} → 12.2 roods (12,300 square metres)
  • {{convert|12300|m2|rood|abbr=off|lk=on}} → 12,300 square metres (12.2 roods)

A convert can be used in an adjectival phrase, and user-specified text can be inserted.

  • {{convert|1500|ft|m|adj=on}} → 1,500-foot (460 m)
  • {{convert|1500|ft|m|adj=mid|-long}} → 1,500-foot-long (460 m)

If no output unit is specified, a default is used.

  • {{convert|123.4|ft}} → 123.4 feet (37.6 m)
  • {{convert|123.4|ft|abbr=on}} → 123.4 ft (37.6 m)
  • {{convert|1500|ft||adj=mid|-long}} → 1,500-foot-long (460 m)

The last example used || to explicitly show that the output unit has been omitted. If that is not done, the result is an error, and holding the mouse over the error message shows that "-long" is misinterpreted as the output unit.

The input and output can be swapped ("flipped").

  • {{convert|12300|m2|rood|abbr=off|order=flip}} → 12.2 roods (12,300 square metres)
In a flipped conversion, an option such as |lk=out means "link the right-hand side".
  • {{convert|12300|m2|rood|abbr=off|lk=out|order=flip}} → 12.2 roods (12,300 square metres)
  • {{convert|12300|m2|rood|abbr=off|lk=in|order=flip}} → 12.2 roods (12,300 square metres)
  • {{convert|12300|m2|rood|abbr=off|lk=on|order=flip}} → 12.2 roods (12,300 square metres)

The input value can be written out in words.

  • {{convert|5|mi|km|spell=in|0}} → five miles (8 km)
  • {{convert|5|mi|km|spell=In|0}} → Five miles (8 km)

Ranges of values are supported.

  • {{convert|3|-|6|ft}} → 3–6 feet (0.91–1.83 m)
  • {{convert|3|to|6|ft|abbr=off|sp=us}} → 3 to 6 feet (0.91 to 1.83 meters)

A range can use more than two values.

  • {{convert|100|x|120|x|210|mm|in}} → 100 by 120 by 210 millimetres (3.9 in × 4.7 in × 8.3 in)
  • {{convert|100|x|120|x|210|mm|in|abbr=on}} → 100 mm × 120 mm × 210 mm (3.9 in × 4.7 in × 8.3 in)
  • {{convert|100|by|120|by|210|mm|in}} → 100 by 120 by 210 millimetres (3.9 by 4.7 by 8.3 in)

Some input units consist of multiple components.

  • {{convert|5|ft|8|in}} → 5 feet 8 inches (1.73 m)
  • {{convert|11|st|3|lb|kg}} → 11 stone 3 pounds (71 kg)

The output can show several different units.

  • {{convert|123|nmi|km mi}} → 123 nautical miles (228 km; 142 mi)
  • {{convert|123|hPa|psi inHg|abbr=on|lk=on}} → 123 hPa (1.78 psi; 3.6 inHg)

Some outputs give a measurement in multiple units.

  • {{convert|123.4|m|ydftin}} → 123.4 metres (134 yd 2 ft 10 in)
  • {{convert|123.4|kg|stlb}} → 123.4 kilograms (19 st 6 lb)
Only output multiple codes such as ydftin can be used:
  • {{convert|123.4|m|yd ft in}} → 123.4 metres (135.0 yd; 405 ft; 4,860 in)
  • {{convert|123.4|m|yardfootinch}} → 123.4 m Error in convert: Unit name "yardfootinch" is not known