User:Happy-melon/Convert

From translatewiki.net
Jump to: navigation, search

Simple conversion

{{#convert: 10 m | km }}

{{#convert: 10 m | km }}

Position and formatting of numbers and units

*{{#convert: 10  m | km }}
*{{#convert: 10m | km }}
*{{#convert: 10 km | m }}
*{{#convert: 10-km | m }}
*{{#convert: 10E2 km | m }}
*{{#convert: 10E-2 km | m }}
*{{#convert: 10.0E2 km | m }}
*{{#convert: 10.0E2.5 km | m }}
  • {{#convert: 10 m | km }}
  • {{#convert: 10m | km }}
  • {{#convert: 10 km | m }}
  • {{#convert: 10-km | m }}
  • {{#convert: 10E2 km | m }}
  • {{#convert: 10E-2 km | m }}
  • {{#convert: 10.0E2 km | m }}
  • {{#convert: 10.0E2.5 km | m }}

Precision 1

*{{#convert: 10 m | km }}
*{{#convert: 11 m | km }}
*{{#convert: 12 m | km }}
*{{#convert: 13 m | km }}
*{{#convert: 14 m | km }}
*{{#convert: 15 m | km }}
*{{#convert: 16 m | km }}
*{{#convert: 17 m | km }}
*{{#convert: 18 m | km }}
*{{#convert: 19 m | km }}
*{{#convert: 20 m | km }}
  • {{#convert: 10 m | km }}
  • {{#convert: 11 m | km }}
  • {{#convert: 12 m | km }}
  • {{#convert: 13 m | km }}
  • {{#convert: 14 m | km }}
  • {{#convert: 15 m | km }}
  • {{#convert: 16 m | km }}
  • {{#convert: 17 m | km }}
  • {{#convert: 18 m | km }}
  • {{#convert: 19 m | km }}
  • {{#convert: 20 m | km }}

Precision 2

*{{#convert: 10.0 m | km }}
*{{#convert: 10.1 m | km }}
*{{#convert: 10.2 m | km }}
*{{#convert: 10.3 m | km }}
*{{#convert: 10.4 m | km }}
*{{#convert: 10.5 m | km }}
*{{#convert: 10.6 m | km }}
*{{#convert: 10.7 m | km }}
  • {{#convert: 10.0 m | km }}
  • {{#convert: 10.1 m | km }}
  • {{#convert: 10.2 m | km }}
  • {{#convert: 10.3 m | km }}
  • {{#convert: 10.4 m | km }}
  • {{#convert: 10.5 m | km }}
  • {{#convert: 10.6 m | km }}
  • {{#convert: 10.7 m | km }}

String interpolation

{{#convert: 25, 26, 27, 28, 29, and 30 km }}

{{#convert: 25, 26, 27, 28, 29, and 30 km }}

Precision 3

{{#convert: 25, 26, 27, 28, 29, and 30 miles }}

{{#convert: 25, 26, 27, 28, 29, and 30 miles }}

Precision 4

{{#convert:35000, 35E3, 35.0E3, 350E2, 3.500E4, 35000E0, 350000E-1 m | km }}

{{#convert:35000, 35E3, 35.0E3, 350E2, 3.500E4, 35000E0, 350000E-1 m | km }}

#sourceunit

*{{#convert: 25 | #sourceunit = km }}
*{{#convert: 25 | #sourceunit=km }}
*{{#convert: 25 | #sourceunit = km | #sourceunit = mm }}
*{{#convert: 25 | #sourceunit = km | cm }}
  • {{#convert: 25 | #sourceunit = km }}
  • {{#convert: 25 | #sourceunit=km }}
  • {{#convert: 25 | #sourceunit = km | #sourceunit = mm }}
  • {{#convert: 25 | #sourceunit = km | cm }}

Precision overrides

*{{#convert: 1 mi | #dp = 0 }}
*{{#convert: 1 mi | #dp=1 }}
*{{#convert: 1 mi | #dp = -2 }}
*{{#convert: 1 mi | #dp = 5 }}
*{{#convert: 1 mi | #dp = -8 }}
*{{#convert: 1 mi | #sf = 0 }}
*{{#convert: 1 mi | #sf=1 }}
*{{#convert: 1 mi | #sf = 3 }}
*{{#convert: 1 mi | #sf = 5 }}
*{{#convert: 1 mi | #sf = -8 }}
  • {{#convert: 1 mi | #dp = 0 }}
  • {{#convert: 1 mi | #dp=1 }}
  • {{#convert: 1 mi | #dp = -2 }}
  • {{#convert: 1 mi | #dp = 5 }}
  • {{#convert: 1 mi | #dp = -8 }}
  • {{#convert: 1 mi | #sf = 0 }}
  • {{#convert: 1 mi | #sf=1 }}
  • {{#convert: 1 mi | #sf = 3 }}
  • {{#convert: 1 mi | #sf = 5 }}
  • {{#convert: 1 mi | #sf = -8 }}

Errors

*{{#convert: 25 | km }}
*{{#convert: 25 foobars | mi }}
*{{#convert: 25 mi | #sourceunit = foobar }}
*{{#convert: 25 km | s }}
*{{#convert: 25 km/Pa | m/Pa }}
*{{#convert: 25 km/s/l }}
*{{#convert: 25 km/m3 }}
  • {{#convert: 25 | km }}
  • {{#convert: 25 foobars | mi }}
  • {{#convert: 25 mi | #sourceunit = foobar }}
  • {{#convert: 25 km | s }}
  • {{#convert: 25 km/Pa | m/Pa }}
  • {{#convert: 25 km/s/l }}
  • {{#convert: 25 km/m3 }}

#sourceunit = #targetunit

*{{#convert: 25 km | #targetunit = #sourceunit }}
*{{#convert: 25 km | #sourceunit = #targetunit }}
  • {{#convert: 25 km | #targetunit = #sourceunit }}
  • {{#convert: 25 km | #sourceunit = #targetunit }}