Jump to content

سانچہ:Convert

آزاد انسائیکلوپیڈیا، وکیپیڈیا توں

سانچہ:Transwiki guide

Template {{convert}} calculates measurements from one unit (you can enter) to another one, and then presents the results. For example:

{{تحویل|2|km|mi}} → ۲ کلومیٹر (۱٫۲ میل)
{{تحویل|7|mi|km}} → ۷ میل (۱۱ کلومیٹر)

The available units are listed below. Units are case-sensitive always (سانچہ:Xt, not سانچہ:!xt and not سانچہ:!xt). Multiple formatting and calculation options are listed below.

Unit name or symbol (abbreviation): 1 pound or 1 lb?

[سودھو]

By default, the first value shows unit name, the second the symbol (or abbreviation). Use |abbr=on/off to change this behaviour:

{{تحویل|1|lb|kg}} → ۱ پونڈ (۰٫۴۵ کلوگرام) (To compare; default: first value shows unit name)
{{تحویل|1|lb|kg|abbr=on}} → ۱ پونڈ (۰٫۴۵ کلوگرام)
{{تحویل|1|lb|kg|abbr=off}} → ۱ پونڈ (۰٫۴۵ کلوگرام)
  • |abbr=in toggles the default behaviour (|abbr=out):
{{تحویل|1|lb|kg|abbr=in}} → ۱ پونڈ (۰٫۴۵ کلوگرام)

Adjective: a 10-mile distance

[سودھو]

Use |adj=on to produce the adjective form. The difference:

{{تحویل|10|mi|km}} to go → ۱۰ میل (۱۶ کلومیٹر) to go. (To compare, default)
A {{تحویل|10|mi|km|adj=on}} distance → A ۱۰-میل (۱۶ کلومیٹر) distance. (Adjective form)

Rounding: 100 ft is 30 m or 30.5 m or 30.48 m?

[سودھو]

By definition, 100  فٹ equals ۳۰٫۴۸ میٹر. In practical use, it is common to round the calculated metric number. With that, there are several possibilities.

Default rounding

[سودھو]
By default, the conversion result will be rounded either to precision comparable to that of the input value (the number of digits after the decimal point—or the negative of the number of non-significant zeroes before the point—is increased by one if the conversion is a multiplication by a number between 0.02 and 0.2, remains the same if the factor is between 0.2 and 2, is decreased by 1 if it is between 2 and 20, and so on) or to two significant figures, whichever is more precise. An exception to this is rounding temperatures (see below).
Examples of rounding
InputDisplays asNote
{{تحویل|123|ft|m|-1}}۱۲۳ فٹ (۴۰ میٹر)
{{تحویل|123|ft|m|0}}۱۲۳ فٹ (۳۷ میٹر)
{{تحویل|123|ft|m|1}}۱۲۳ فٹ (۳۷٫۵ میٹر)
{{تحویل|550|ft|m|0}}۵۵۰ فٹ (۱۶۸ میٹر)Approximate value is 167.64 m
{{تحویل|550|ft|m}}۵۵۰ فٹ (۱۷۰ میٹر)Rounds to 170, when approximate value is 167.64 m
{{تحویل|500|ft|m|0}}۵۰۰ فٹ (۱۵۲ میٹر)Approximate value is 152.4 m
{{تحویل|500|ft|m}}۵۰۰ فٹ (۱۵۰ میٹر)Rounds to 150, when approximate value is 152.4 m

Convert supports four types of rounding:

Round to a given precision: use |precision=

[سودھو]

Specify the desired precision with the fourth unnamed parameter (or third unnamed parameter if the "convert to" parameter is omitted; or fifth unnamed parameter if a range is specified; or fourth unnamed parameter again if a range is specified and the "convert to" parameter is omitted; needs to be replaced with a "precision" named parameter). The conversion is rounded off to the nearest power of 110 this number. For instance, if the result is 8621 and the round number is "-2", the result will be 8600. If the result is "234.0283043" and the round number is "0", the result will be 234.

Round to a given number of significant figures: |sigfig=

[سودھو]

To specify the output number to be with n significant figures use |sigfig=<number>:

  • To compare: {{تحویل|1200|ft|m}} → ۱٬۲۰۰ فٹ (۳۷۰ میٹر)
  • {{تحویل|1200|ft|m|sigfig=4}} → ۱٬۲۰۰ فٹ (۳۶۵٫۸ میٹر)
  • {{تحویل|1200|ft|m|sigfig=3}} → ۱٬۲۰۰ فٹ (۳۶۶ میٹر)
  • {{تحویل|1200|ft|m|sigfig=2}} → ۱٬۲۰۰ فٹ (۳۷۰ میٹر)
  • {{تحویل|1200|ft|m|sigfig=1}} → ۱٬۲۰۰ فٹ (۴۰۰ میٹر)

Setting |sigfig= is meaningless

  • {{تحویل|1200|ft|m|sigfig=0}} → ۱٬۲۰۰ فٹ (۳۷۰ میٹر)*

Round to a multiple of 5: 15, 20, 25, …

[سودھو]

Using |round=5 rounds the outcome to a multiple of 5.

{{تحویل|10|m|ft}} → ۱۰ میٹر (۳۳ فٹ)
{{تحویل|10|m|ft|round=5}} → ۱۰ میٹر (۳۵ فٹ)

Similar: using |round=25 rounds the outcome to a multiple of 25.

{{تحویل|10|m|ft}} → ۱۰ میٹر (۳۳ فٹ)
{{تحویل|10|m|ft|round=25}} → ۱۰ میٹر (۲۵ فٹ)
To compare: {{تحویل|10|m|ft|sigfig=4}} → ۱۰ میٹر (۳۲٫۸۱ فٹ)

In a range, one can round each value individually to the default. Use |round=each:

{{تحویل|10 x 200 x 3000|m|ft}} → ۱۰ در ۲۰۰ در ۳٬۰۰۰ میٹر (۳۳ فٹ × ۶۵۶ فٹ × ۹٬۸۴۳ فٹ)
{{تحویل|10 x 200 x 3000|m|ft|round=each}} → ۱۰ در ۲۰۰ در ۳٬۰۰۰ میٹر (۳۳ فٹ × ۶۶۰ فٹ × ۹٬۸۰۰ فٹ)

Round to a multiple of a given fraction: 2 316 inch

[سودھو]

Specify the desired denominator using |frac=<some positive integer>. (Denominator is the below-the-slash number, for example the 3 in 13).

{{تحویل|5.56|cm|in|frac=16}} → ۵٫۵۶ سینٹیمیٹر (۲ ۳۱۶ انچ)
{{تحویل|8|cm|in|frac=4}} → ۸ سینٹیمیٹر (۳ ۱۴ انچ)

The fraction is reduced when possible:

{{تحویل|8|cm|in|frac=100}} → ۸ سینٹیمیٹر (۳ ۳۲۰ انچ)
{{تحویل|8|cm|in}} → ۸ سینٹیمیٹر (۳٫۱۵۰ انچ) (To compare)

Rounding the temperatures °C, °F and K

[سودھو]

In temperatures, the conversion will be rounded either to precision comparable to that of the input value or to that which would give three significant figures when expressed in kelvins, whichever is more precise.

{{تحویل|10|C|F K}} → ۱۰ °C (۵۰ °F؛ ۲۸۳ ک)

Note

For a temperature difference, like to convert "A rise of 10 °C", use |C-change=10 &tc.
{{تحویل|10|C-change|F-change K-change}} → A rise of ۱۰ °C (۱۸ °F؛ ۱۰ ک)

Into multiple units: ۱۰ °C (۵۰ °F؛ ۲۸۳ ک)

[سودھو]

Separate the multiple output units by a space:

{{تحویل|10|C|F K}} → ۱۰ °C (۵۰ °F؛ ۲۸۳ ک)
{{تحویل|5|km|mi nmi}} → ۵ کلومیٹر (۳٫۱ میل؛ ۲٫۷ بحری میل)

If the output unit names contain spaces, use a '+' separator.

See also

For multiple-unit options like 1 فٹ 5 in, see #In input and #In output.

Ranges of values

[سودھو]

A range: 6 to 17 kg (13 to 37 lb)

[سودھو]

Range indicators are entered as the second parameter (between the values). Range separators can be:
سانچہ:Convert/doc/range separator list

Multiple dimensions: ۶ میٹر × ۱۲ میٹر (۲۰ فٹ × ۳۹ فٹ)

[سودھو]
Use "by"
{{تحویل|6|by|12|ft|m}} → ۶ در ۱۲ فٹ (۱٫۸ در ۳٫۷ میٹر)
Use "×" or ""x""
{{تحویل|6|x|12|m|ft}} → ۶ در ۱۲ میٹر (۲۰ فٹ × ۳۹ فٹ)

In science, the formal way is to set |x| and |abbr=on (keeping dimensions right, like in area = x km2):

{{تحویل|6|x|12|m|ft|abbr=on}} → ۶ میٹر × ۱۲ میٹر (۲۰ فٹ × ۳۹ فٹ)

About feet, inch in ranges and multiples

[سودھو]

While it is possible to enter feet, inch in a simple conversion, this is not possible for ranges:

Words

[سودھو]

Spelling of unit name: UK metre or US meter?

[سودھو]

Default spelling of units is en-UK. To show en-US spelling, use |sp=us:

{{تحویل|1|m|ft}} → ۱ میٹر (۳٫۳ فٹ)—default
{{تحویل|1|m|ft|sp=us}} → ۱ میٹر (۳٫۳ فٹ)

Spell out numbers: ten miles

[سودھو]

To write a number in words, use |spell=in:

{{تحویل|10|mi|m|spell=in}} → ۱۰ میل (۱۶٬۰۰۰ میٹر)*

To spell out both in and out values, use |spell=on:

{{تحویل|10|mi|m|spell=on}}Lua error in ماڈیول:Convert at line 402: attempt to call upvalue 'speller' (a string value).

To make first letter a capital, use |spell=In, |spell=On

{{تحویل|10|mi|m|spell=In}} → ۱۰ میل (۱۶٬۰۰۰ میٹر)*
{{تحویل|10|mi|m|spell=On}}Lua error in ماڈیول:Convert at line 402: attempt to call upvalue 'speller' (a string value).

Remember that the spelling of the units (ft, m) is independently set by |abbr=. To the extreme:

{{تحویل|10|mi|m|spell=on|abbr=off|sp=us}}Lua error in ماڈیول:Convert at line 402: attempt to call upvalue 'speller' (a string value).

Extra words: 4 planted acres

[سودھو]
Incomplete section
{{تحویل|4|acre||adj=pre|planted}} → ۴ planted acre (۱٫۶ ha)

Extra adjective words: A ۱۰-فٹ-long corridor

[سودھو]
{{تحویل|4|ft|m|adj=mid|-long}} → ۱۰-فٹ-long (۳٫۰ میٹر)

Plurals: 1 inch, 2 inches

[سودھو]

The unit symbol is singular always. Depending on the preceding number only, a unit name can be shown plural.

Exception

Entering the unit spelled |foot| forces singular output "foot", whatever the number is.

  • {{تحویل|100|foot|abbr=off}} → ۱۰۰ فٹ (۳۰ میٹر)

Extreme changes for grammatical structure: The 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons

[سودھو]

This example is from the article Fort McHenry:

The American defenders had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons.
You can't get this sentence structure as a direct result of using
{{convert}} and its options. However, you can get the correctly converted numbers and the grammatical structure you want to use by using
{{convert}} plus three stages of editing, previewing and saving versions of the text you wish to change.
Stage 1: Enter the input numbers and units in
{{convert}} as usual (this stage is just to get the calculated output):
  • had {{تحویل|18 |, |24 |, |32 |lb |kg |0 }} cannons
Get the converted data below by clicking سانچہ:Keypress or سانچہ:Keypress:
→ had ۱۸, ۲۴, ۳۲ پونڈ (۸, ۱۱, ۱۵ کلوگرام) cannons
Stage 2: Change the resulting text from a
{{convert|}} template result to plain code by adding subst: to the template name (short for "substitution") :
Double-check this by clicking سانچہ:Keypress. The preview will show the converted numbers are still correct:
→ had 18, 24, 32 pounds (8, 11, 15 kg) cannons
Then click سانچہ:Keypress.
Stage 3: Click Edit at the top of the article again, and then go to the text in the editing window. You'll see that the text is there in plain code. The template
{{convert|}} itself will have disappeared. You can change the text as needed. The substituted text and plain code in the editing window in this example would be:
had 18,&nbsp;24,&nbsp;32 pounds (8,&nbsp;11,&nbsp;15&nbsp;kg) cannons
You can edit this text as usual to add the grammatical features you wish. In this example, editing the above text to:
  • had 18-,_24-_and_32-pounder (8,&nbsp;11_and_15&nbsp;kg) cannons
And then saving your edit will show the following result in the article text:
→ "had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons"

Numbers

[سودھو]

Using an SI prefix: gigameter (Gm), or micrometer (μm)

[سودھو]

سانچہ:Sidebar metric prefixes (small) Units can have an میٹرک سابقہ جات like G before the unit: Gm, and giga before the name: gigameter. These are plain multiplication factors.

To illustrate, these are trivial calculations (from meter to meter), showing the multiplication factor:

  • ۱۲ Gمیٹر (۱٫۲×۱۰۱۰ میٹر)
  • ۱۲ µمیٹر (۱٫۲×۱۰−۵ میٹر)

The prefix can be added before the SI unit (here: unit m for meter):

  • {{تحویل|12|Gm|mi|abbr=on}} → ۱۲ Gمیٹر (۷٬۵۰۰٬۰۰۰ میل)
  • Mm: ۱۲ Mمیٹر (۷٬۵۰۰ میل)
  • km: ۱۲ کلومیٹر (۳۹٬۰۰۰ فٹ)
  • mm: ۱۲  ملی میٹر (۰٫۴۷ انچ)
  • μm: ۱۲ µمیٹر (۰٫۰۱۲  ملی میٹر)
  • um: ۱۲ µمیٹر (۰٫۰۱۲  ملی میٹر) (letter "u" can be used for "μ" here)

The prefix can be used in the output unit:

  • {{تحویل|12000|mi|Mm|abbr=on}} → ۱۲٬۰۰۰ میل (۱۹ Mمیٹر)
  • {{تحویل|12|in|μm|abbr=on}} → ۱۲ انچ (۳۰۰٬۰۰۰ µمیٹر)

As an exception, the non-SI unit "inch" can have the "μ" prefix too)

  • {{تحویل|12|μm|μin|abbr=on}} → ۱۲ µمیٹر (۴۷۰ µin)

Engineering notation: 7 × 106 m

[سودھو]

In the unit: e6m

[سودھو]

Engineering number notations like 7E6 (for 7 × 106) can be entered as a "prefix" to the unit:

{{تحویل|7|e6m}} → ۷ ملین میٹر (۲۳٬۰۰۰٬۰۰۰ فٹ)

The same is possible for the output unit:

{{تحویل|23,000,000|ft|e6m}} → ۲۳٬۰۰۰٬۰۰۰ فٹ (۷٫۰×۱۰^۶ میٹر)

Any standard unit (not a combination, multiple, or built-in unit) can have such a prefix:

e3 (thousand), e6 (million), e9 (billion), e12 (trillion), e15 (quadrillion).

Scientific notation: 1.23×10−14

[سودھو]

In scientific notation, a number is written like سانچہ:Rnd/e−.

With
{{convert}}, the input can be in e-notation such as 12.3e4. This value is displayed as a power of ten, and the output is displayed in scientific notation, except that an output value satisfying 0.01 <= v < 1000 is shown as a normal number. In addition, if the output value is 1000 and sigfig=4 is used, the value is displayed as a normal number.
  • {{تحویل|12.3e-15|atm|atm|abbr=on}} → ۱۲٫۳×۱۰−۱۵ atm (۱٫۲۳×۱۰−۱۴ atm)
  • {{تحویل|0.00000005|atm|atm|abbr=on}} → ۰٫۰۰۰۰۰۰۰۵ atm (۵٫۰×۱۰−۸ atm)

Input with fractions: ۱ ۱۲ انچ (۳۸٫۱  ملی میٹر)

[سودھو]

The number to convert can be written in fractions. Both / (keyboard slash) and (fraction slash) are accepted:

{{تحویل|1/2|in|mm|1}}۱۲ انچ (۱۲٫۷  ملی میٹر)
{{تحویل|1⁄2|in|mm|1}}۱۲ انچ (۱۲٫۷  ملی میٹر)

With integers, use a + sign

{{تحویل|2+1⁄2|in|mm|1}}۲ ۱۲ انچ (۶۳٫۵  ملی میٹر)

When negative, use a hyphen - and repeat it:

{{تحویل|-2-1⁄2|in|mm|1}}−۲ ۱۲ انچ (−۶۳٫۵  ملی میٹر)
{{تحویل|2-1⁄2|in|mm|1}} → ۲–۱۲ انچ (۵۰٫۸–۱۲٫۷  ملی میٹر) Note: this is read as a range
{{تحویل|-2+1⁄2|in|mm|1}}[آلہ تبدیل: invalid number] سانچہ:ٹھیک نہیں Should be a number, not an expression (do not require a calculation)

Output with horizontal fraction bar in: 1/2 inch

[سودھو]

Using a double slash (//) returns a horizontal bar fraction:

  • {{تحویل|1//2|in|mm|1}}۱/۲ انچ (۱۲٫۷  ملی میٹر)
  • {{تحویل|2+1//2|in|mm|1}}۲ ۱/۲ انچ (۶۳٫۵  ملی میٹر)

Thousands separator: 1,000 mi and 1000 mi

[سودھو]

In input, a comma for thousands separator is accepted but not required; a gap (space) is not accepted. In output, by default, the thousand separator is the comma:

Set |comma=off to remove the separator from the output:

  • {{تحویل|1234567|m|ft|comma=off}} → ۱۲۳۴۵۶۷ میٹر (۴۰۵۰۴۱۷ فٹ)*

Use |comma=gaps to use digit grouping by gap (thin space) as a thousands separator:

  • {{تحویل|1234567|m|ft}} → ۱٬۲۳۴٬۵۶۷ میٹر (۴٬۰۵۰٬۴۱۷ فٹ) (To compare, default)
  • {{تحویل|1234567|m|ft|comma=gaps}}۱۲۳۴۵۶۷ میٹر (۴۰۵۰۴۱۷ فٹ)

Setting |comma=5 or |comma=gaps5 will only add the separator when the number of digits is 5 or more:

  • {{تحویل|1234|m|ft}} → ۱٬۲۳۴ میٹر (۴٬۰۴۹ فٹ) (To compare, default)
  • {{تحویل|1234|m|ft|comma=5}} → ۱۲۳۴ میٹر (۴۰۴۹ فٹ)
  • {{تحویل|1234567|m|ft|comma=5}} → ۱٬۲۳۴٬۵۶۷ میٹر (۴٬۰۵۰٬۴۱۷ فٹ)
  • {{تحویل|1234|m|ft|comma=gaps5}}۱۲۳۴ میٹر (۴۰۴۹ فٹ)*
  • {{تحویل|1234567|m|ft|comma=gaps5}}۱۲۳۴۵۶۷ میٹر (۴۰۵۰۴۱۷ فٹ)*

Output manipulation

[سودھو]

Brackets and separators: 10 میٹر [33 ft]

[سودھو]

Punctuation that distinguishes the two measurements is set by |disp=.
Options are: b (the default), sqbr, comma, or, br, x|...:

{{تحویل|10|m|ft}} → ۱۰ میٹر (۳۳ فٹ)—( ) brackets are the default
{{تحویل|10|m|ft|disp=sqbr}} → ۱۰ میٹر [۳۳ فٹ]
{{تحویل|10|m|ft|disp=comma}} → ۱۰ میٹر، ۳۳ فٹ
{{تحویل|10|m|ft|disp=or}} → ۱۰ میٹر یا ۳۳ فٹ

Setting |disp=br will force a new line (<br>)

{{تحویل|10|m|ft|disp=br}} → ۱۰ میٹر
۳۳ فٹ

Also |disp=br() will force a new line, and keep the brackets:

{{تحویل|10|m|ft|disp=br()}} → ۱۰ میٹر
(۳۳ فٹ)

Setting |disp=x|... allows any text as separator:

{{تحویل|10|m|ft|disp=x|_MyText_}} → ۱۰ میٹر_MyText_۳۳ فٹ—(To display spaces, use &nbsp;)

Flipping (reordering) the two measurements: ۱٬۶۰۹٫۳ میٹر (۱ میل)

[سودھو]

Setting |order=flip will flip (swap) the two measurements:

{{تحویل|1|mi|m}} → ۱ میل (۱٬۶۰۹٫۳ میٹر) (To compare, default)
{{تحویل|1|mi|m|order=flip}} → ۱٬۶۰۹٫۳ میٹر (۱ میل)

When converting to multiple units, the effect is:

{{تحویل|10|km|mi nmi|order=flip}} → ۶٫۲۱۳۷ میل؛ ۵٫۳۹۹۶ بحری میل (۱۰ کلومیٹر)
{{تحویل|10|km|nmi mi|order=flip}} → ۵٫۳۹۹۶ بحری میل؛ ۶٫۲۱۳۷ میل (۱۰ کلومیٹر)

Displaying parts of the result: ۲ (۱٫۵)

[سودھو]

It is possible to display only parts of the conversion result:

ConvertOutputDescription
{{تحویل|2|cuyd|m3}}۲ یارڈ مکعب (۱٫۵ میٹر3) Default, to compare
{{تحویل|2|cuyd|m3|abbr=values}} ۲ (۱٫۵)Input and output numbers
{{تحویل|2|cuyd|m3|disp=unit}}یارڈ مکعب Input unit
{{تحویل|2|cuyd|m3|disp=unit|adj=on}}یارڈ-مکعب Input unit, adjective (hyphenated)
{{تحویل|2|cuyd|cuyd|0|disp=out|abbr=off}}۲ یارڈ مکعبInput (workaround)
{{تحویل|2|cuyd|m3|abbr=~}}۲ یارڈ مکعب [cu yd] (۱٫۵ میٹر3) Input: both name and symbol
{{تحویل|2|cuyd|m3|disp=unit2}}میٹر3Output unit (symbol)
{{تحویل|2|cuyd|m3|disp=unit2|abbr=off}}مکعب میٹرOutput unit (name)
{{تحویل|2|cuyd|m3|disp=number}}۱٫۵ Output value
{{تحویل|2|cuyd|m3|disp=out}}۱٫۵ میٹر3 Output value and unit
{{تحویل|2|cuyd|m3|disp=out|abbr=off}}۱٫۵ مکعب میٹر Output value and unit

Display input name and symbol: 2 kilopascals [kPa]

[سودھو]

Setting |abbr=~ returns both name and symbol of the first (input) unit:

{{تحویل|2|kPa|psi|abbr=~}} → ۲ کلوپاسکال [کلوPa] (۰٫۲۹ psi)
A {{تحویل|2|kPa|psi|abbr=~|adj=on}} pressureسانچہ:بلا لف

Table options

[سودھو]

For the wikitable structure, there are three options: add a line-break, split the result over columns and make the table sortable.

Enforced line break

[سودھو]

|disp=br adds a line-break and omits brackets.

|disp=br() adds a line-break and does add brackets to the converted value. This may be useful in tables:

|disp=br|disp=br()
۱۰۰ کلومیٹر
۶۲ میل
۱۰۰ کلومیٹر
(۶۲ میل)

Table columns showing numbers only

[سودھو]

Using {convert} in a table cell, with |disp=table splits the result over two columns:

{{تحویل|10|m|ft|disp=table}} → style="text-align:right;"|۱۰

|style="text-align:right;"|۳۳

|disp=tablecen does the same, and also centers the text:

{{تحویل|20|m|ft|disp=tablecen}} → style="text-align:center;"|۲۰

|style="text-align:center;"|۶۶

The units are added as a column header:

  m ft
|disp=table ۱۰ ۳۳
|disp=tablecen ۲۰ ۶۶
|disp=<other> (default) ۳۰ میٹر (۹۸ فٹ)

Sorting

[سودھو]

Use |sortable=on to include a hidden numerical sortkey in the output, suitable for use in a table with sortable columns. Technically, this places a hidden string before the actual displayed values:

{{تحویل|10|m|ft|sortable=on}}سانچہ:بلا لف

Use both |disp=table and |sortable=on together to produce table columns (pipe symbols) for each value in sortable columns:

m ft
A ۱۵ ۳۴ ۵۲
B ۱۵٫۵ ۵۱
C ۱۶٫۰ ۵۲٫۵
D ۱۶ ۵۲

The generated sortkey is calculated in a consistent way based on both the value and its unit as passed to the convert template. In most cases convert uses the passed value converted to SI base units. It is therefore not necessarily the displayed value or other alternate units and is calculated regardless of output format options. Using different units or different order of units in individual rows should therefore not lead to incorrect sorting, although variations in rounding can give surprising results, since an unrounded number is used for the sortkey.

Units

[سودھو]

Multiple units: 1 فٹ 5 in

[سودھو]

In input

[سودھو]

Base document #Input multiples lists options for multiple unit input (like ft,in). It can catch predefined sets only (units that can be subdivided, e.g. yd into ft):

  • {{تحویل|1|yd|2|ft|3|in}} → ۱ یارڈ ۲ فٹ ۳ انچ (۱٫۶۰ میٹر)
  • {{تحویل|2|ft|3|in|cm}} → ۲ فٹ ۳ انچ (۶۹ سینٹی میٹر)
  • {{تحویل|1|lb|5|oz|g}} → ۱ پونڈ ۵ اونس (۶۰۰ گرام)

In output

[سودھو]

Available multiple-unit output options predefined, like ftin and ydftin. The full list is at #Output multiples.

  • {{تحویل|2|m|ftin}} → ۲ میٹر (۶ فٹ ۷ انچ)
  • {{تحویل|2|m|ft in}} → ۲ میٹر ([آلہ تبدیل: نامعلوم اکائی])—using a space, returns the decimal point
  • {{تحویل|2|m}} → ۲ میٹر (۶ فٹ ۷ انچ)—the default
See also
  • {{hands}} a length used to measure horses.

'per' units: kg/hl

[سودھو]

When using a slash (/), a unit like kg/hl is recognized as kilograms per hectolitre and will be converted with other mass/volume units.

  • {{تحویل|1000|kg/hl}}Lua error in ماڈیول:Convert at line 644: attempt to index field 'per_unit_fixups' (a nil value).

Currency per unit: $/mi, $/km

[سودھو]

Using currency symbols in a $ per unit value, you can convert the per-unit:

  • {{تحویل|10|$/mi|$/km}} → $۱۰ فی میل ($۶٫۲/کلومیٹر) YesY
You can set the unit in both values using |$=:
  • {{تحویل|10|$/mi|$/km|$=€}} → €۱۰ فی میل (€۶٫۲/کلومیٹر)

You can not convert the currency. This outcome combination is not possible: سانچہ:!mxt

Parameter list

[سودھو]

سانچہ:Convert/doc/parameter list

Deprecated options

[سودھو]

سانچہ:Convert/doc/deprecations list

TemplateData

[سودھو]
This is the TemplateData documentation for this template used by VisualEditor and other tools.

Convert

Converts measurements to other units.

Template parameters[سانچہ ڈیٹا دا پربندھ کرو]

ParameterتفصیلTypeحالت
value1

the value to convert

Numberoptional
from unit2

Lineoptional
to units3

the unit to convert into

Lineoptional
precision or suffix4

significant digits after decimal dot or, if negative, exponent of ten

Numberoptional
link unitslk

“on” all, “in” input, “out” output or “off” no units

Default
off
Lineoptional
abbreviationabbr

display for the units: “on” unit symbols, “off” all unit names in full words, “in” input unit symbol, “out” abbreviated output units, “values” no units at all

Default
out
Lineoptional
spellingsp

“us” display U.S. spelling of unit names

Lineoptional
adjectiveadj

adjective form (singular unit name appended by hyphen) “on” or “mid” to put conversion at end

Lineoptional
conversiondisp

display conversion result: “or” after ‘or’, “x” with custom prefix and suffix, “b” in parentheses, “table”/“tablecen”, “output only” alone, “output number only” alone and without unit, “unit” not at all but input unit; if the value is a number it is used as precision

Default
b
Lineoptional
orderingorder

“flip” returns converted value first, input value second.

Lineoptional
significant figuressigfig

number that sets the number of significant figures

Numberoptional
rounding outputround

“5” rounds the output number to nearest multiple of 5, “25” to nearest multiple of 25, “each” rounds each number in a range

Lineoptional
thousands separatorcomma

Sets or suppresses thousand separator in the numbers. “off” = no separator; “gaps”: use space not comma; “5” and “gaps5”: only add separator when number > 5 positions (10,000 or more)

Default
on
Lineoptional
sort keysortable

“on” generates a hidden sort key

Lineoptional

ہور ویکھو

[سودھو]

سانچہ:Convert/documentation navbox