Template:Convert: Difference between revisions

From Halopedia, the Halo wiki

m (Cleanup)
Line 35: Line 35:


=== Miscellaneous ===
=== Miscellaneous ===
*The template is set to British English by default. For American English spelling, use <code>|sp=us</code>. For example:
*The template is set to British English by default. For American English spelling, use <code>|sp=us</code>. For example: <code><nowiki>{{Convert|6.2|ft|cm|sp=us}}</nowiki></code> will change the spelling of "centimetres" to "centimeters".
<code><nowiki>{{Convert|6.2|ft|cm|sp=us}}</nowiki></code> will change the spelling of "centimetres" to "centimeters".
*To flip the display of conversions, use <code>|disp=flip</code>. For example, <code><nowiki>{{Convert|6.2|ft|cm|disp=flip}}</nowiki></code> will flip the starting Imperial measurement as the converted measurement.
*To flip the display of conversions, use <code>|disp=flip</code>. For example, <code><nowiki>{{Convert|6.2|ft|cm|disp=flip}}</nowiki></code> will flip the starting Imperial measurement as the converted measurement.
*To specify the decimal point for a more accurate conversion, use <code>|sigfig=</code>. For example, <code><nowiki>{{Convert|300|m|ft|sigfig=6}}</nowiki></code> will give a more accurate conversion.
*To specify the decimal point for a more accurate conversion, use <code>|sigfig=</code>. For example, <code><nowiki>{{Convert|300|m|ft|sigfig=6}}</nowiki></code> will give a more accurate conversion of {{Convert|300|m|ft|sigfig=6}} over {{Convert|300|m|ft}} (which uses <code><nowiki>{{Convert|300|m|ft}}</nowiki></code>).


[[Category:Convert templates]]</noinclude>
[[Category:Convert templates]]</noinclude>

Revision as of 12:18, December 10, 2015


How to use

The template needs three objects within it.

Height/Length

Conversion list:

  • cm=centimeter
  • m=meter
  • ft=feet
  • km=kilometers
'Example

{{Convert|1|m|cm}} converts one unit (a meter) into centimeters. This produces: 1 metre (100 cm).

Mass

Conversion list:

  • lb=pound
  • kg=kilogram
  • MT=Metric ton
Example

{{Convert|1|kg|lb}} converts one unit (a Kilogram) into pounds. This produces: 1 kilogram (2.2 lb).

Speed

Conversion list:

  • km/h= Kilometers per hour
  • mph=Miles per hour
Example

{{Convert|1|mph|km/h}} converts one MPH (miles per hour) into Kilometers per hour. This produces: 1 mile per hour (1.6 km/h).

Miscellaneous

  • The template is set to British English by default. For American English spelling, use |sp=us. For example: {{Convert|6.2|ft|cm|sp=us}} will change the spelling of "centimetres" to "centimeters".
  • To flip the display of conversions, use |disp=flip. For example, {{Convert|6.2|ft|cm|disp=flip}} will flip the starting Imperial measurement as the converted measurement.
  • To specify the decimal point for a more accurate conversion, use |sigfig=. For example, {{Convert|300|m|ft|sigfig=6}} will give a more accurate conversion of 300 metres (984.252 ft) over 300 metres (980 ft) (which uses {{Convert|300|m|ft}}).