Jump to content

सहाय्य:Convert

विकिपीडिया, मुक्‍त ज्ञानकोशातून

साचा:Wikipedia how to Template {{convert}} is used to convert a value from one unit of measurement to another. This page provides an overview of the options available when using the template.

प्रश्न विचारणे

[संपादन]

एकके/Units

[संपादन]

/जलद सुरुवातQuick start

[संपादन]

By default, the name of the input unit is shown, while the output is abbreviated using the unit's symbol. If wanted, names or symbols can be used, and the output precision can be specified.

  • {{convert|123.4|ft|m}}१२३.४ फूट (३७.६ मी)
  • {{convert|123.4|ft|m|abbr=on}}१२३.४ फूट (३७.६ मी)
  • {{convert|123.4|ft|m|abbr=off}}१२३.४ फूट (३७.६ मीटर)
  • {{convert|123.4|ft|m|abbr=off|sp=us}}१२३.४ फूट (३७.६ मीटर)
  • {{convert|123.4|ft|m|0}}१२३.४ फूट (३८ मी)
  • {{convert|123.4|ft|m|3}}१२३.४ फूट (३७.६१२ मी)

To avoid overlinking, units are not normally linked, but they can be when needed.

  • {{convert|12300|m2|rood|abbr=off|lk=on}}१२,३०० चौरस मीटर (१२.२ rood)
  • {{convert|12300|m2|rood|abbr=off|lk=out}}१२,३०० चौरस मीटर (१२.२ rood)

A convert can be used in an adjectival phrase, and user-specified text can be inserted.

  • {{convert|1500|ft|m|adj=on}}१,५००-फूट (४६० मी)
  • {{convert|1500|ft|m|adj=mid|-long}}१,५००-फूट-long (४६० मी)

If no output unit is specified, a default is used.

  • {{convert|123.4|ft}}१२३.४ फूट (३७.६ मी)
  • {{convert|123.4|ft|abbr=on}}१२३.४ फूट (३७.६ मी)
  • {{convert|1500|ft||adj=mid|-long}}१,५००-फूट-long (४६० मी)

The last example used || to explicitly show that the output unit has been omitted. If that is not done, the result is an error, and holding the mouse over the error message shows that "-long" is misinterpreted as the output unit.

The input and outputs can be "flipped". When flipped, an option such as |lk=out means "link the right-hand side".

  • {{convert|12300|m2|rood|abbr=off|lk=out}}१२,३०० चौरस मीटर (१२.२ rood)
  • {{convert|12300|m2|rood|abbr=off|lk=out|order=flip}}१२.२ rood (१२,३०० चौरस मीटर)
  • {{convert|12300|m2|rood|abbr=off|lk=in|order=flip}}१२.२ rood (१२,३०० चौरस मीटर)

The input value can be spelled.

  • {{convert|5|mi|km|spell=in|0}}५ मैल (८ किमी)
  • {{convert|5|mi|km|spell=In|0}}५ मैल (८ किमी)

Ranges of values are supported.

  • {{convert|3|-|6|ft}}३–६ फूट (०.९१–१.८ मी)
  • {{convert|3|to|6|ft|abbr=off|sp=us}}३ to ६ फूट (०.९१ to १.८ मीटर)

A range can use more than two values.

  • {{convert|100|x|120|x|210|mm|in}}१०० by १२० by २१० मिलीमीटर (३.९ × ४.७ × ८.३ इंच)
  • {{convert|100|x|120|x|210|mm|in|abbr=on}}१०० × १२० × २१० मिमी (३.९ × ४.७ × ८.३ इंच)
  • {{convert|100|by|120|by|210|mm|in}}१०० by १२० by २१० मिलीमीटर (३.९ by ४.७ by ८.३ इंच)

Some input units consist of multiple components.

  • {{convert|5|ft|8|in}} फूट ८ इंच (१.७३ मी)
  • {{convert|11|st|3|lb|kg}}११ stone ३ पौंड (७१ किलो)

An output can be a combination of several units.

  • {{convert|123|nmi|km mi}}१२३ nautical mile (२२८ किमी; १४२ मैल)
  • {{convert|123|hPa|psi inHg|abbr=on|lk=on}}रुपांतरण त्रूटी: "psi inHg" एकक अनोळखी आहे

Some outputs consist of multiple units.

  • {{convert|123.4|m|ydftin}}१२३.४ मीटर (१३४ यार्ड २ फूट १० इंच)
  • {{convert|123.4|kg|stlb}}१२३.४ किलोग्रॅम (१९ st ६ पौंड)

By default, the output value is rounded to adjust its precision to match that of the input. An input such as 1234 is interpreted as 1234 ± 0.5, while 1200 is interpreted as 1200 ± 50, and the output value is displayed accordingly, taking into account the scale factor used in the conversion.

If the default is not wanted, the precision of output values can be specified using:

  • |N (where N is a number) to specify the number of digits to be displayed after the decimal mark (round output to N decimal places).
  • |-N (where -N is a negative number) to specify the number of digits before the decimal mark that should be replaced with zero (round output to nearest 10N).
  • |sigfig=N (where N is a positive number) to specify the number of significant digits (round output to N significant figures).
  • |round=5 to round the output to the nearest multiple of 5. The round value can be 0.5, 5, 10, 25 or 50.

Examples:

  • {{convert|1234|ft|m}}१,२३४ फूट (३७६ मी)
  • {{convert|1234|ft|m|2}}१,२३४ फूट (३७६.१२ मी)
  • {{convert|1234|ft|m|-1}}१,२३४ फूट (३८० मी)
  • {{convert|1234|ft|m|round=5}}१,२३४ फूट (३७६ मी)
  • {{convert|1234|ft|m|round=10}}१,२३४ फूट (३७६ मी)
  • {{convert|1234|ft|m|round=25}}१,२३४ फूट (३७६ मी)
  • {{convert|1234|ft|m|round=50}}१,२३४ फूट (३७६ मी)
  • {{convert|1234|ft|m|sigfig=2}}१,२३४ फूट (३८० मी)
  • {{convert|1234|ft|m|sigfig=4}}१,२३४ फूट (३७६.१ मी)
  • {{convert|1230|ft|m}}१,२३० फूट (३७० मी)
  • {{convert|1230|ft|m|0}}१,२३० फूट (३७५ मी)
  • {{convert|1230|ft|m|1}}१,२३० फूट (३७४.९ मी)
  • {{convert|5670|sqft}}५,६७० चौरस फूट (५२७ मी)
  • {{convert|5670|sqft|-2}}५,६७० चौरस फूट (५०० मी)
  • {{convert|7x8x12|ft|abbr=on|round=0.5}}रुपांतरण त्रूटी: मूल्य "7x8x12" अंकातच आवश्यक आहे

An input value such as 5000 is assumed to have one significant figure, while 5001 has four. If wanted, "5000." can be used to specify an input number that has four significant figures.

  • {{convert|5000|m}}५,००० मीटर (१६,००० फूट)
  • {{convert|5000.|m}}५,०००. मीटर (१६,४०४ फूट)
Use US (en-US) spelling for unit names

Use |sp=us to specify that unit names should be displayed with US spelling:

  • {{convert|6|km}}६ किलोमीटर (३.७ मैल)
  • {{convert|6|km|sp=us}}६ किलोमीटर (३.७ मैल)
Spell out numbers in words

Use |spell=in to specify that the input value should be spelled in words, or |spell=In (uppercase "I") to start with an uppercase letter:

  • {{convert|5|mi|km|spell=in}}५ मैल (८.० किमी)
  • {{convert|5|mi|km|spell=in|abbr=off|0}}५ मैल (८ किलोमीटर)
  • {{convert|5|mi|km|spell=In|0}}५ मैल (८ किमी)
  • {{convert|5|mi|km|spell=In|abbr=off|0}}५ मैल (८ किलोमीटर)
  • {{convert|2+1/4|mi|km|abbr=off|0|spell=In}} मैल (४ किलोमीटर)
  • {{convert|2+1/4|mi|km|abbr=off|0|spell=In|sp=us}} मैल (४ किलोमीटर)

The input and output can be "flipped", as shown in these examples. Logically, the resulting first number is spelled:

  • {{convert|5|mi||0|order=flip|spell=in}}८ किलोमीटर (५ मैल)
  • {{convert|5|mi||0|order=flip|spell=In|abbr=off}}८ किलोमीटर (५ मैल)

The "||" provides an empty output unit to mean "use the default".

Both input and output values can be spelled:

  • {{convert|5|mi|m|-2|spell=on|sp=us|abbr=off}}५ मैल (८,००० मीटर)
  • {{convert|5|mi|m|-2|spell=On|sp=us|abbr=off}}५ मैल (८,००० मीटर)

Thousands separator

[संपादन]

Commas in input numbers are ignored. Gaps are not allowed in input.

In output, by default, the thousands separator is the comma:

  • {{convert|1234567|m|ft}}१२,३४,५६७ मीटर (४०,५०,४१७ फूट)
  • {{convert|1,234,567|m|ft}}१२,३४,५६७ मीटर (४०,५०,४१७ फूट)

Set |comma=off to remove separators from the result:

  • {{convert|1,234,567|m|ft|comma=off}}१२,३४,५६७ मीटर (४०,५०,४१७ फूट)

Setting |comma=5 adds a separator only when the number of digits is 5 or more:

  • {{convert|1234|m|ft}}१,२३४ मीटर (४,०४९ फूट)
  • {{convert|1234|m|ft|comma=5}}१२३४ मीटर (४०४९ फूट)
  • {{convert|12345|m|ft|comma=5}}१२,३४५ मीटर (४०,५०२ फूट)

Set |comma=gaps to use a small space for thousands grouping. If the resulting number is copied, only the digits are copied (the gaps are omitted).

  • {{convert|1234567|m|ft}}१२,३४,५६७ मीटर (४०,५०,४१७ फूट)
  • {{convert|1234567|m|ft|comma=gaps}}१२३४५६७ मीटर (४०५०४१७ फूट)

Gaps are inserted on both sides of the decimal mark. However, by default, no gap is inserted before a single digit. If a gap is always wanted, |comma=gaps3 can be used.

  • {{convert|1234.98765|m|ft|comma=gaps}}२३४.९८७६५ मीटर (०५१.७९६८ फूट)
  • {{convert|1234.98765|m|ft|comma=gaps3}}१,२३४.९८७६५ मीटर (४,०५१.७९६८ फूट)
  • {{convert|1234.9876|m|ft|comma=gaps}}२३४.९८७६ मीटर (०५१.७९७ फूट)
  • {{convert|1234.9876|m|ft|comma=gaps3}}१,२३४.९८७६ मीटर (४,०५१.७९७ फूट)
  • {{convert|1.2349876|m|ft|comma=gaps}}१.२३४९८७६ मीटर (४.०५१७९७ फूट)
  • {{convert|1.2349876|m|ft|comma=gaps3}}१.२३४९८७६ मीटर (४.०५१७९७ फूट)

An input value can be specified as a fraction.

  • {{convert|1/2|in|mm|1}} इंच (१२.७ मिमी)
  • {{convert|1/2|in|mm|1|adj=on}}-इंच (१२.७ मिमी)
  • {{convert|2+1/2|in|mm|1}} इंच (६३.५ मिमी)
  • {{convert|-2-1/4|in|mm|1}}−२ इंच (−५७.२ मिमी)
  • {{convert|1/2|in|mm|1|spell=in}} इंच (१२.७ मिमी)

If two slashes are used, a horizontal fraction bar is used.

  • {{convert|1//2|in|mm|1}}/ इंच (१२.७ मिमी)
  • {{convert|2+1//2|in|mm|1}} / इंच (६३.५ मिमी)

An output can be expressed with a fraction using |frac=N where N is the denominator. For example, |frac=8 rounds the output to the nearest eighth.

  • {{convert|219|mm|in|abbr=on}}२१९ मिमी (८.६ इंच)
  • {{convert|219|mm|in|abbr=on|frac=2}}२१९ मिमी (८.६ इंच)
  • {{convert|219|mm|in|abbr=on|frac=4}}२१९ मिमी (८.६ इंच)
  • {{convert|219|mm|in|abbr=on|frac=8}}२१९ मिमी (८.६ इंच)
  • {{convert|222|mm|in|abbr=on|frac=8}}२२२ मिमी (८.७ इंच)

A fraction is applied to the output unit (if there is only one), or to non-SI units (if using a combination), except that if a precision is also specified, the fraction only applies to the hand unit.

The |disp= ("display") option may be used to "join" the input and output, as shown in the following examples.

ConvertOutputDescription
{{convert|2.4|m|ft}}२.४ मीटर (७.९ फूट)default
{{convert|2.4|m|ft|disp=b}}२.४ मीटर (७.९ फूट)brackets (same as default)
{{convert|2.4|m|ft|disp=sqbr}}२.४ मीटर [७.९ फूट]square brackets
{{convert|2.4|m|ft|disp=or}}२.४ मीटर or ७.९ फूटor
{{convert|2.4|m|ft|disp=comma}}२.४ मीटर, ७.९ फूटcomma
{{convert|2.4|m|ft|disp=br}}२.४ मीटर
७.९ फूट
"<br />", line break

A range of values can be specified, as shown in the following examples.

Separator Convert Result Notes
- {{convert|3|-|6|ft}} ३–६ फूट (०.९१–१.८ मी) Input can be hyphen (-) or en dash (–), output uses en dash
and {{convert|3|and|6|ft}} ३ and ६ फूट (०.९१ and १.८ मी)
and(-) {{convert|3|and(-)|6|ft}} ३ and ६ फूट (०.९१ and १.८ मी) and on left; en dash on right
and(-)|order=flip {{convert|3|and(-)|6|ft|order=flip}} ०.९१ and १.८ मीटर (३ and ६ फूट)
or {{convert|3|or|6|ft}} ३ or ६ फूट (०.९१ or १.८ मी)
to {{convert|3|to|6|ft}} ३ to ६ फूट (०.९१ to १.८ मी)
to(-) {{convert|3|to(-)|6|ft}}  to ६ फूट (०.९१–१.८ मी) to on left; en dash on right
to(-)|order=flip {{convert|3|to(-)|6|ft|order=flip}} ०.९१ to १.८ मीटर (३–६ फूट)
to about {{convert|3|to about|6|ft}} ३ to about ६ फूट (०.९१ to about १.८ मी)
+/- {{convert|3|+/-|6|ft}}  ± ६ फूट (०.९१ ± १.८ मी)
+/-± &plusmn; {{convert|3|±|6|ft}}  ± ६ फूट (०.९१ ± १.८ मी)
+ {{convert|3|+|6|ft}} ३ + ६ फूट (०.९१ + १.८ मी)
, {{convert|3|,|6|ft}} ३, ६ फूट (०.९१, १.८ मी)
, and {{convert|3|, and|6|ft}} ३, and ६ फूट (०.९१, and १.८ मी)
, or {{convert|3|, or|6|ft}} ३, or ६ फूट (०.९१, or १.८ मी)
by {{convert|3|by|6|ft}} ३ by ६ फूट (०.९१ by १.८ मी)
by(x) {{convert|3|by(x)|6|ft}} रुपांतरण त्रूटी: "by(x)" एकक अनोळखी आहे by on left; multiply (×) on right
by(x)|order=flip {{convert|3|by(x)|6|ft|order=flip}} रुपांतरण त्रूटी: "by(x)" एकक अनोळखी आहे
x {{convert|3|x|6|ft}} ३ by ६ फूट (०.९१ मी × १.८ मी) Scientific notation.
|abbr=on alters the punctuation
x|abbr=on {{convert|3|x|6|ft|abbr=on}}  फूट ×  फूट (०.९१ मी × १.८ मी)
xx |xx| is deprecated. Use |x| instead
* |*| is deprecated. Use |x| instead
to- |to-| is deprecated. Use |to(-)| instead
& |&| is deprecated. Use |and| instead
abbr=mos |abbr=mos is deprecated. Use |x| or |by| instead

Ranges can use more than two values.

ConvertOutput
{{convert|3|x|4|x|24|in}}३ by ४ by २४ इंच (७६ × १०० × ६१० मिमी)
{{convert|3|x|4|to|6+1/2|x|8+3/4|in}}३ by ४ to by इंच (७६ × १०० to १७० × २२० मिमी)

Ranges can be specified in the first parameter.

ConvertOutput
{{convert|3.2-7.5|ha}}रुपांतरण त्रूटी: मूल्य "3.2-7.5" अंकातच आवश्यक आहे
{{convert|3x4x24|in}}रुपांतरण त्रूटी: मूल्य "3x4x24" अंकातच आवश्यक आहे

अधिकचे शब्द

[संपादन]

Some options provide text that is included in the output, as shown in the following examples.

ConvertOutputDescription
{{convert|4|ft||adj=mid|-long}}४-फूट-long (१.२ मी) Adjectival with mid-text between input and output (sets |adj=on)
{{convert|40|acre||adj=pre|planted}}४० planted एकर (१६ ha) Text before the input unit
{{convert|4|m||disp=preunit|+ }}४+ मीटर (१३+ फूट) Same text before the input and output units
{{convert|4|m||disp=preunit|+ |or more }}४+ मीटर (१३ or more फूट) Different text before the input and output units
{{convert|20|impfloz||disp=x|, approximately }}२० imperial fluid ounce, approximately ५७० मिली; १९ US fl oz Text before the output (replaces the join)
{{convert|100|m||disp=x|/day (|/day)}}१०० मीटर/day (३३० फूट/day) Text before and after the output (replaces the join)

In each of the above examples, "||" provides an empty output unit which causes the default output to be used. An output unit, possibly empty, must be specified to avoid the template interpreting the extra text as the output unit. For example, using {{convert|4|ft|adj=mid|-long}} has the same effect as using {{convert|4|ft|-long|adj=mid}}, namely that an error would occur because "-long" would be used as the output unit. The following illustrates the error (hover the mouse over the error text to see that the problem is due to "-long" ) and how it may be avoided.

  • {{convert|4|ft|adj=mid|-long}}रुपांतरण त्रूटी: "-long" एकक अनोळखी आहे
  • {{convert|4|ft||adj=mid|-long}}४-फूट-long (१.२ मी)
  • {{convert|4|ft| |adj=mid|-long}}४-फूट-long (१.२ मी)
  • {{convert|4|ft|m|adj=mid|-long}}४-फूट-long (१.२ मी)

Displaying parts of a conversion

[संपादन]

The following examples show how to display only a part of the output.

ConvertOutputDescription
{{convert|2|cuyd|m3}}२ cubic yard (१.५ मी)normal convert
{{convert|2|cuyd|m3|abbr=values}}२ (१.५)input and output values
{{convert|2|cuyd|m3|disp=unit}}cubic yardinput unit
{{convert|2|cuyd|m3|disp=unit|adj=on}}cubic-yardinput unit, adjectival (hyphenated)
{{convert|2|cuyd|cuyd|0|disp=out|abbr=off}}२ cubic yardinput (workaround)
{{convert|2|cuyd|m3|disp=unit2}}मीoutput unit (symbol)
{{convert|2|cuyd|m3|disp=unit2|abbr=off}}घन मीटरoutput unit (name)
{{convert|2|cuyd|m3|disp=number}}१.५output value
{{convert|2|cuyd|m3|disp=out}}१.५ मीoutput value and unit
{{convert|2|cuyd|m3|abbr=off|disp=out}}१.५ घन मीटरoutput value and unit

Flipping the order of output

[संपादन]

To invert the order of measurements, simply use |order=flip

  • {{convert|10|km|mi}} १० किलोमीटर (६.२ मैल) (default)
  • {{convert|10|km|mi|order=flip}} ६.२ मैल (१० किमी)

Wrapping and line breaking

[संपादन]

Convert uses the regular space (" ") and non-breaking space (&nbsp; which shows: " ") to control line-breaking (also called wrapping/nowrapping).

In all examples below, an &nbsp; is shown as "_" (red underscore): "3_ft".

Wrapping is possible where a regular space (" ") is used. Prevent wrapping is enforced in the template using the non-breaking space, that ties and keeps text elements together.

3 feet may break after "3"
3&nbsp;ft, or 3_ft, will not break after "3"
A line break (<br/>) forces a newline (line break), and so overrules any nowrap setting at that point.

Word meaning:

In measurements, SI uses wording that says that value = number × unit, for example length = number × meter.
In {{Convert}} documentation, sometimes 'value' is uses to mean the number; and abbr is used to mean unit symbol(s).
Within a single measured value (number and unit)

The separator between the number and the unit can be a space or a nonbreaking space (&nbsp;):

  • When a unit is abbreviated (symbol is shown), the separator is &nbsp;.
{{convert|12|m|ft|abbr=on}}१२_मी (३९_फूट)
  • When a unit is not abbreviated (name is shown), the separator is a space.
{{convert|12|m|ft}}१२ मीटर (३९_फूट)
This can be set (overruled) to be &nbsp; by |adj=j (for 'join').
{{convert|12|m|ft|adj=j}}१२_मीटर (३९_फूट)
  • Some units do not have a symbol and always use a space (such as acre).
{{convert|3|acre|m2|abbr=on}}३ एकर (१२,०००_मी)
  • Except, option |adj=j ("join") forces the number-unit separator (space) to be &nbsp;.
{{convert|3|acre|m2|adj=j}}_एकर (१२,०००_मी)
  • Except, &nbsp; is always used when a measurement is in multiple units.
{{convert|1|ft|6|in|cm}}_फूट ६_इंच (४६_सेंमी)
{{convert|2|m|ftin}}२ मीटर (६_फूट ७_इंच)
  • Except, if option |adj=on is used and the unit is not abbreviated, the separator is a hyphen ("-").
{{convert|2|m|ftin|adj=on}}२-मीटर (६_फूट ७_इंच)
  • When the name of a number is used, &nbsp; is used as the separator between the number and the name. For example, a measurement spelled as "12 million metres" has &nbsp; before "million" and a space afterwards.
{{convert|12|e6m}}१२_दशलक्ष मीटर (३,९०,००,०००_फूट)
Between measurements
  • A space is used as the separator in a join between the first and second measurement.
{{convert|3|ft|m}}३ फूट (०.९१_मी)
  • Except for the special case before "[":
{{convert|12|in|cm|disp=sqbr|abbr=on}}१२_इंच_[३०_सेंमी] (&nbsp; before "[")
  • Multiple output measurements (by listing units) always use a space between measurements ("; " has a space after ";").
{{convert|2|acre|m2 sqft ha}}रुपांतरण त्रूटी: "m2 sqft ha" एकक अनोळखी आहे
Between components of a measurement (e.g., in a range; between foot–inch)
  • A measurement in multiple units always uses a space between components ("1 foot 6 inches" has &nbsp; before the unit names, but a space after "foot").
{{convert|1|ft|6|in|cm}}_फूट ६_इंच (४६_सेंमी)
  • In a range, spaces are generally used to separate items. For example, "to" and "or" have a space before and after in the following.
{{convert|12|to|20|in|cm}}१२ to २० इंच (३० to ५१_सेंमी)
{{convert|12|or|20|in|cm}}१२ or २० इंच (३० or ५१_सेंमी)
  • The ranges +/- and , always use &nbsp;:
{{convert|12|+/-|2|in|cm}}१२_±_२ इंच (३०_±_५.१_सेंमी)
{{convert|12|,|20|in|cm}}१२,_२० इंच (३०,_५१_सेंमी)
  • The "to-" range (same as "to(-)") is an exception. When a unit is not abbreviated, "to" has &nbsp; before and a space after.
{{convert|12|to-|20|in|cm}}१२_to २० इंच (३०–५१_सेंमी)
  • The "x" range is an exception. When a unit is abbreviated, "×" has a space before and &nbsp; after.
{{convert|12|x|20|in|cm}}१२ by २० इंच (३०_सेंमी ×_५१_सेंमी)
Overrule by setting a line break
  • Parameter |disp=br adds a forced line break (<br/>) between measurements; brackets are omitted.
{{convert|12|m|ft|disp=br}}12 metres<br/>39 feet shows:
१२ मीटर
३९ फूट
Preview wikicode

To see the wikicode result of the convert template: put your {{convert|...}} code into Special:ExpandTemplates and then preview by clicking OK.

सारण्या

[संपादन]

The following parameters are intended for use in tables.

ParameterDescription
|disp=tablefor a table cell with align="right"
|disp=tablecenfor a table cell with align="center"
|sortable=onoutput a numeric hidden sort field for a sortable table

The following shows the wikitext output by some example converts.

ConvertResulting wikitext
{{convert|47.5|kg|lb}}47.5 kilograms (105 lb)
{{convert|47.5|kg|lb|disp=table}}align="right"|47.5
|align="right"|105
{{convert|47.5|kg|lb|disp=tablecen}}align="center"|47.5
|align="center"|105
{{convert|47.5|kg|lb|sortable=on}}<span style="display:none">7001475000000000000</span>47.5 kilograms (105 lb)

Fixed table

[संपादन]

This wikitext:

{|class="wikitable"
! align=right, rowspan="2" |
!colspan="2"| Length
!colspan="2"| Weight
|- style="vertical-align:bottom;"
!metres !!ft in !!kg !!lb
|-
! Lorem ipsum
| {{convert|28.1|m|ftin|disp=table}}
| {{convert|47.5|kg|lb|disp=table}}
|-
! Dolor sit amet
| {{convert|9.9|m|ftin|disp=table}}
| {{convert|74.1|kg|lb|disp=table}}
|-
! Consectetur
| {{convert|38.2|m|ftin|disp=table}}
| {{convert|31.5|kg|lb|disp=table}}
|-
! Adipisicing elit
| {{convert|18.7|m|ftin|disp=table}}
| {{convert|52.7|kg|lb|disp=table}}
|}

produces this table:

Length Weight
metresft inkglb
Lorem ipsum २८.१९२ फूट २ इंच ४७.५१०५
Dolor sit amet ९.९३२ फूट ६ इंच ७४.११६३
Consectetur ३८.२१२५ फूट ४ इंच ३१.५६९
Adipisicing elit १८.७६१ फूट ४ इंच ५२.७११६

सॉर्टेबल टेबल

[संपादन]

This wikitext:

{|class="wikitable sortable"
! align=right, rowspan="2" |
!colspan="2"| Length
!colspan="2"| Weight
|- style="vertical-align:bottom;"
!metres !!ft in !!kg !!lb
|-
! Lorem ipsum
| {{convert|28.1|m|ftin|disp=table|sortable=on}}
| {{convert|47.5|kg|lb|disp=table|sortable=on}}
|-
! Dolor sit amet
| {{convert|9.9|m|ftin|disp=table|sortable=on}}
| {{convert|74.1|kg|lb|disp=table|sortable=on}}
|-
! Consectetur
| {{convert|38.2|m|ftin|disp=table|sortable=on}}
| {{convert|31.5|kg|lb|disp=table|sortable=on}}
|-
! Adipisicing elit
| {{convert|18.7|m|ftin|disp=table|sortable=on}}
| {{convert|52.7|kg|lb|disp=table|sortable=on}}
|}

produces this table:

Length Weight
metresft inkglb
Lorem ipsum 7001281000000000000२८.१९२ फूट २ इंच 7001475000000000000४७.५१०५
Dolor sit amet 7000990000000000000९.९३२ फूट ६ इंच 7001741000000000000७४.११६३
Consectetur 7001382000000000000३८.२१२५ फूट ४ इंच 7001315000000000000३१.५६९
Adipisicing elit 7001187000000000000१८.७६१ फूट ४ इंच 7001527000000000000५२.७११६

एकके एकवचनात किंवा बहुवचनात/Units in singular or plural

[संपादन]

Unit symbols are always singular. Unit names can be singular or plural. A unit is singular when the number is exactly +1:

  • {{convert|0.5|ft|m|abbr=off}} ०.५ फूट (०.१५ मीटर)
  • {{convert|1|ft|m|abbr=off}} १ फूट (०.३० मीटर)
  • {{convert|2|ft|m|abbr=off}} २ फूट (०.६१ मीटर)
Note: as of November 2014, in certain conditions this topic can behave unexpected (bug).

Setting |adj=1 makes these values singular: (−1 <= v and v < 0) or (0 < v and v <= 1)

  • {{convert|2|ft|m|adj=1|abbr=off}} २ फूट (०.६१ मीटर)
  • {{convert|1|ft|m|adj=1|abbr=off}} १ फूट (०.३० मीटर)
  • {{convert|0.5|ft|m|adj=1|abbr=off}} ०.५ फूट (०.१५ मीटर)
  • {{convert|0|ft|m|adj=1|abbr=off}} ० फूट (० मीटर)
  • {{convert|-0.5|ft|m|adj=1|abbr=off}} −०.५ फूट (−०.१५ मीटर)
  • {{convert|-1|ft|m|adj=1|abbr=off}} −१ फूट (−०.३० मीटर)
  • {{convert|-2|ft|m|adj=1|abbr=off}} −२ फूट (−०.६१ मीटर)

प्राचलांची यादी/Parameter list

[संपादन]
प्राचल किंमत वर्णन नोंदी
|abbr=inin Use symbol for first (left-hand side) unit Symbol ('abbreviation')
|abbr=offoff Use name for all units Symbol ('abbreviation')
|abbr=nonenone
|abbr=onon Use symbol for all units Symbol ('abbreviation')
|abbr=outout Use symbol for right-hand side unit (default) Symbol ('abbreviation')
|abbr=valuesvalues Show only input and output numbers, not units Parts only
|abbr=~~ Shows both unit name and symbol Symbol & name
|adj=jj Join number and unit name using "&nbsp;" instead of a space Join values
|adj=mid|mid User-specified text after the input unit; sets adj=on (adjective). Expects 1 unnamed parameter. Word adding, adjective
|adj=onon Unit name is adjective (singular and hyphenated) Grammar, adjective
|adj=pre|pre User-specified text before input unit. Expects 1 unnamed parameter. Word adding
|adj=ri0ri0 Round input with precision 0 Rounding and significant figures
|adj=ri1ri1 Round input with precision 1 Rounding and significant figures
|adj=ri2ri2 Round input with precision 2 Rounding and significant figures
|adj=ri3ri3 Round input with precision 3 Rounding and significant figures
|disp=bb Join input and output using " (...)" (default) Join values
|disp=sqbrsqbr Join input and output using " [...]" Join values
|disp=brbr Join input and output using "<br/>" Join values
|disp=commacomma Join input and output using ", " Join values
|disp=oror Join input and output using " or " Join values
|disp=numbernumber Display output number only Parts only
|disp=output number onlyoutput number only
|disp=outout Display only output number and name/symbol Parts only
|disp=output onlyoutput only
|disp=preunit|…[|…]preunit Text to be inserted after value and before units, for both input and output, with optionally different text for output. Expects 1 or 2 unnamed parameters. Word adding
|disp=tabletable Output is suitable for a table cell with align="right" Table columns
|disp=tablecentablecen Output is suitable for a table cell with align="center" Table columns
|disp=unitunit Display input name/symbol only (not input number, not output) Parts only
|disp=unit2unit2 Display output name/symbol only (not input; not output number) Parts only
|disp=x|...x Join input and output using user-specified text Word adding
|comma=505 Only use comma for thousands separator if 5 or more digits Number format
|comma=gapsgaps Use gaps (space), not comma, for thousands separator Number format
|comma=gaps5gaps5 Use gaps (space), but only if 5 or more digits Number format
|comma=offoff No thousands separator Number format
|frac=NN Show imperial number in fractions, denominator=N Number format, fraction
|lk=inin Link left-hand side unit name or symbol Unit link
|lk=onon Link all unit names or symbols (but not twice for the same unit) Unit link
|lk=outout Link right-hand side unit name or symbol Unit link
|order=flipflip Inverts order of input, output measurements (conversion first) Order
|round=505 Rounds calculation to the nearest multiple of 5 Rounding and significant figures
|round=2525 Rounds calculation to the nearest multiple of 25 Rounding and significant figures
|round=eacheach In a range, each number is rounded by the default rounding Rounding and significant figures
|sigfig=NN Round output number to N significant figures (N is a positive integer) Rounding and significant figures
|sortable=inin Output numeric hidden sort field for use in a sortable table (based on input) Table sort
|sortable=onon
|sortable=outout Output numeric hidden sort field for use in a sortable table (based on output) Table sort
|sp=usus Use U.S. spelling (like "meter" instead of default "metre") Spelling U.S. names
|spell=inin Spell input number in words Spelling numbers
|spell=InIn Spell input number in words with first letter uppercase Spelling numbers
|spell=onon Spell input and output numbers in words Spelling numbers
|spell=OnOn Spell input and output numbers in words with first letter uppercase Spelling numbers
|$=$ Replace $-sign with a currency sign, for example in $/acre (no currency conversion happens) Cost per unit
|debug=yesyes Debugging only. In a sortable table: show the normally hidden sort key Table sort
|abbr=commacomma Deprecated. Use |comma=off Number format
|abbr=mosmos Deprecated. Use |x| or |by| Range format
|adj=101 Deprecated. Do not use. No need to deviate from regarding plurals Plural or singular
|adj=flipflip Deprecated. Use |order=flip Order
|adj=nocommanocomma Deprecated. Use |comma=off Number format
|disp=202 Deprecated. Use |disp=output only Parts only
|disp=505 Deprecated. Use |round=5 Rounding and significant figures
|disp=flipflip Deprecated. Use |order=flip Order
|disp=flip5flip5 Deprecated. Use |order=flip |round=5 Order, rounding
|disp=nocommanocomma Deprecated. Use |comma=off Number format
|disp=u2u2 Deprecated. Use |disp=unit2 Parts only
|near=505 Deprecated. Use |round=5 Rounding and significant figures

Complicated grammar

[संपादन]

This example is from article Fort McHenry:

The American defenders had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons.

This result cannot reasonably be produced by {{convert}}. However, convert can be used to construct the required text.

  • Use {{convert}} with subst to insert the required wikitext into the article or your sandbox.
    had {{subst:convert|18|,|24|,|32|lb|kg|0}} cannons
    → had १८, २४, ३२ पौंड (८, ११, १५ किलो) cannons
  • When the edit is saved, the convert template is replaced with the result.
  • Edit the result to produce the final text.
    → had 18-, 24- and 32-pounder (8, 11 and 15 kg) cannons

An alternative to subst would be to enter {{convert|18|,|24|,|32|lb|kg|0}} into Special:ExpandTemplates, then copy and edit its result into the article.

Deprecated

[संपादन]

साचा:Convert/doc/deprecations list

मर्यादा/Limitations

[संपादन]

This is a list of features that the module may be expected to support, but which will not work.

Composite units cannot be used in a range:

If an expression is wanted, it has to use {{#expr:...}}:

  • {{convert|3*12|ft|mm}}रुपांतरण त्रूटी: मूल्य "3*12" अंकातच आवश्यक आहे
  • {{convert|{{#expr:3*12}}|ft|mm}}३६ फूट (११,००० मिमी)
ह्या लेखाचा/विभागाचा इंग्रजी किंवा अमराठी भाषेतून मराठी भाषेत भाषांतर करावयाचे बाकी आहे. अनुवाद करण्यास आपलाही सहयोग हवा आहे. ऑनलाईन शब्दकोश आणि इतर सहाय्या करिता भाषांतर प्रकल्पास भेट द्या.