Help:Convert

From WikiMD's Wellness Encyclopedia

Help:Convert

The "Convert" template is a powerful tool used in MediaWiki to facilitate the conversion of units of measurement. It is particularly useful in articles that require the presentation of data in multiple unit systems, such as metric and imperial, to accommodate a global audience. This template automatically handles the conversion calculations and formatting, ensuring consistency and accuracy across Wikipedia articles.

Usage[edit | edit source]

The basic syntax for the Convert template is as follows:

``` [convert: invalid number]

```

- value: The numerical value to be converted. - unit1: The unit of the original value. - unit2: The unit to which the value should be converted. - options: Additional parameters to customize the output.

For example, to convert 10 kilometers to miles, you would use:

``` 10 kilometres (6.2 mi)

```

This would output: "10 kilometers (6.2 mi)".

Parameters[edit | edit source]

The Convert template supports a wide range of parameters to customize its behavior:

- abbr: Use `abbr=on` to display abbreviated units (e.g., "km" instead of "kilometers"). - lk: Use `lk=on` to link the units to their respective Wikipedia articles. - order: Use `order=flip` to reverse the order of the units in the output. - precision: Specify the number of decimal places for the converted value.

Examples[edit | edit source]

1. Basic Conversion:

  - Input: `100 metres (330 ft)

`

  - Output: "100 meters (328 ft)"

2. With Abbreviation:

  - Input: `5 L ([convert: ambiguous unit])

`

  - Output: "5 L (1.3 gal)"

3. Linking Units:

  - Input: `50 kilograms (110 lb)

`

  - Output: "50 kilograms (110 lb)"

4. Custom Precision:

  - Input: `3.5 kilometres (2.2 mi)*

`

  - Output: "3.5 kilometers (2.175 mi)"

Common Use Cases[edit | edit source]

The Convert template is widely used in articles related to science, engineering, geography, and any field where measurements are frequently discussed. It helps maintain consistency and readability, especially in articles that are read by an international audience.

Limitations[edit | edit source]

While the Convert template is highly versatile, it may not support every possible unit or conversion. Users should verify that the units they wish to convert are supported by the template. Additionally, complex conversions involving non-linear relationships (e.g., temperature conversions between Celsius and Fahrenheit) may require additional parameters or manual adjustments.

Also see[edit | edit source]

- Help:Template - Help:Infobox - Help:Magic words - Help:Parser functions

Contributors: Prab R. Tumpati, MD