The converter Template:Convert/flip will convert an amount and display the amount with special formatting. To set the rounding precision, the output unit must be specified, or put "0" to default.
Usage:     {{convert/flip |100.51432|m|ft|r1=1}}
{{convert/flip |1,234|km|mi|comma=off}}
{{convert/flip |10.5|L|usgal|3|x3=exactly}}
{{convert/flip |7|km|mi|disp=x|long (|)}} - custom output

There are special options with Convert/flip, such as r1=2 to round the input amount to 2 decimals, comma=out to show commas only in the output amount, near=25 (or 50) to round to nearest 25, and x0=xx to x5=xx to insert text before/after the amounts or unit names.

       12,340 kilometres (7,670 miles)
       |     |          | |    |     |
       x0   x1         x2 x3   x4   x5

While parameters x0 and x1 insert text before or after the first amount, x2 follows the input unit, x3 puts text before the output amount, x4 follows the output, and x5 follows the output unit name.

The template allows the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=off, wikilinks lk=in or lk=out, and adjective mode adj=on or adj=mid. The separator can also be a semicolon: disp=semi, disp=or, disp=comma, disp=x (customized), disp=sqbr (square brackets), disp=b (default as parentheses), disp=2 (or disp=out) and disp=# (or disp=number).

Examples ಬದಲಾಯಿಸಿ

The examples show various options of conversions:

  • {{convert/flip |1,234|km|mi|comma=off}} → 767 miles (1234 km)
  • {{convert/flip |950|km|mi|abbr=~}}    → ೫೯೦ mi (1 km (0.62 mi)*, ೯೫೦ km)
  • {{convert/flip |3.1415926|km|mi|r1=2|x0=~}} → ~೧.೯೫೨೦೯೫೧ miles (೩.೧೪ km)
  • {{convert/flip |9,564|km|mi|comma=out}}       → 5943 miles (೯,೫೬೪ km)
  • {{convert/flip |9,564|km|mi|lk=in|near=5}}       → ೫,೯೪೫ miles (೯,೫೬೪ km)
  • {{convert/flip |9,564|km|mi|lk=out|near=50}}   → ೫,೯೫೦ miles (೯,೫೬೪ km)
  • {{convert/flip |10.5|L|usgal|4|x3=exactly}} → ೨.೭೭೩೮ US gallons (exactly ೧೦.೫ L)
  • {{convert/flip |9|km|mi|disp=x| [same as | away]}} → ೫.೬ miles* [same as ೯ km away]

Display types: disp=comma, disp=semi, disp=or, disp=out, disp=number, disp=x and disp=b. The numeric results are identical to using Template:Convert to show the computed result but in reverse order.

Common problems ಬದಲಾಯಿಸಿ

The amount is followed by a unit-code (such as "|m") as the 2nd parameter. The output unit-code can be blank "| " as the 3rd parameter, to allow the default output unit to be triggered, while setting parameter 4 to a rounding precision (such as "|5") or use r=5 to set the rounding level. Example: {{convert/flip|19|m| |5}}, as ೬೨.೩೩೫೯೬ feet (೧೯ m).

See also ಬದಲಾಯಿಸಿ