Template:Convert/doc/parameter list: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep
m order alphabetically
meta>Quondum
minor formatting
Line 7: Line 7:
! Note
! Note
|-
|-
|<code>&#124;abbr=in</code> || data-sort-value="in" | in
|<code>&#124;abbr=in</code> || data-sort-value="in" | <code>in</code>
| Use symbol for first (left-hand side) unit
| Use symbol for first (left-hand side) unit
| Symbol ('abbreviation')
| Symbol ('abbreviation')
|-
|-
|<code>&#124;abbr=off</code> || data-sort-value="off" | off
|<code>&#124;abbr=off</code> || data-sort-value="off" | <code>off</code>
| rowspan=2 | Use name for all units
| rowspan=2 | Use name for all units
| rowspan=2 | Symbol ('abbreviation')
| rowspan=2 | Symbol ('abbreviation')
|-
|-
|<code>&#124;abbr=none</code> || data-sort-value="none" | none
|<code>&#124;abbr=none</code> || data-sort-value="none" | <code>none</code>
|-
|-
|<code>&#124;abbr=on</code> || data-sort-value="on" | on
|<code>&#124;abbr=on</code> || data-sort-value="on" | <code>on</code>
| Use symbol for all units
| Use symbol for all units
| Symbol ('abbreviation')
| Symbol ('abbreviation')
|-
|-
|<code>&#124;abbr=out</code> || data-sort-value="out" | out
|<code>&#124;abbr=out</code> || data-sort-value="out" | <code>out</code>
| Use symbol for right-hand side unit (default)
| Use symbol for right-hand side unit (default)
| Symbol ('abbreviation')
| Symbol ('abbreviation')
|-
|-
|<code>&#124;abbr=unit</code> || data-sort-value="unit" | unit
|<code>&#124;abbr=unit</code> || data-sort-value="unit" | <code>unit</code>
| Use symbol for all units when using scientific notation
| Use symbol for all units when using scientific notation
| Symbol ('abbreviation')
| Symbol ('abbreviation')
|-
|-
|<code>&#124;abbr=values</code> || data-sort-value="values" | values
|<code>&#124;abbr=values</code> || data-sort-value="values" | <code>values</code>
| Show only input and output numbers, not units
| Show only input and output numbers, not units
| Parts only
| Parts only
|-
|-
|<code>&#124;abbr=~</code> || data-sort-value="~" | ~
|<code>&#124;abbr=~</code> || data-sort-value="~" | <code>~</code>
| Shows both unit name and symbol
| Shows both unit name and symbol
| Symbol & name
| Symbol & name
|-
|-
|<code>&#124;adj=mid&#124;…</code> || data-sort-value="mid" | mid
|<code>&#124;adj=mid&#124;…</code> || data-sort-value="mid" | <code>mid</code>
| User-specified text after the input unit; sets <code>adj=on</code> (adjective). Expects 1 unnamed parameter.
| User-specified text after the input unit; sets <code>adj=on</code> (adjective). Expects 1 unnamed parameter.
| Word adding, adjective
| Word adding, adjective
|-
|-
|<code>&#124;adj=on</code> || data-sort-value="on" | on
|<code>&#124;adj=on</code> || data-sort-value="on" | <code>on</code>
| Unit name is adjective (singular and hyphenated)
| Unit name is adjective (singular and hyphenated)
| Grammar, adjective
| Grammar, adjective
|-
|-
|<code>&#124;adj=pre&#124;…</code> || data-sort-value="pre" | pre
|<code>&#124;adj=pre&#124;…</code> || data-sort-value="pre" | <code>pre</code>
| User-specified text before input unit. Expects 1 unnamed parameter.
| User-specified text before input unit. Expects 1 unnamed parameter.
| Word adding
| Word adding
|-
|-
|<code>&#124;adj=ri0</code> || data-sort-value="ri0" | ri0
|<code>&#124;adj=ri0</code> || data-sort-value="ri0" | <code>ri0</code>
| Round input with precision 0
| Round input with precision 0
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;adj=ri1</code> || data-sort-value="ri1" | ri1
|<code>&#124;adj=ri1</code> || data-sort-value="ri1" | <code>ri1</code>
| Round input with precision 1
| Round input with precision 1
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;adj=ri2</code> || data-sort-value="ri2" | ri2
|<code>&#124;adj=ri2</code> || data-sort-value="ri2" | <code>ri2</code>
| Round input with precision 2
| Round input with precision 2
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;adj=ri3</code> || data-sort-value="ri3" | ri3
|<code>&#124;adj=ri3</code> || data-sort-value="ri3" | <code>ri3</code>
| Round input with precision 3
| Round input with precision 3
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;comma=5</code> || data-sort-value="05" | 5
|<code>&#124;comma=5</code> || data-sort-value="05" | <code>5</code>
| Only use comma for thousands separator if 5 or more digits
| Only use comma for thousands separator if 5 or more digits
| Number format
| Number format
|-
|-
|<code>&#124;comma=gaps</code> || data-sort-value="gaps" | gaps
|<code>&#124;comma=gaps</code> || data-sort-value="gaps" | <code>gaps</code>
| Use gaps (space), not comma, for thousands separator
| Use gaps (space), not comma, for thousands separator
| Number format
| Number format
|-
|-
|<code>&#124;comma=off</code> || data-sort-value="off" | off
|<code>&#124;comma=off</code> || data-sort-value="off" | <code>off</code>
| No thousands separator
| No thousands separator
| Number format
| Number format
|-
|-
|<code>&#124;disp=b</code> || data-sort-value="b" | b
|<code>&#124;disp=b</code> || data-sort-value="b" | <code>b</code>
| Join input and output using "&nbsp;(...)" (default)
| Join input and output using "&nbsp;(...)" (default)
| Join values
| Join values
|-
|-
|<code>&#124;disp=sqbr</code> || data-sort-value="sqbr" | sqbr
|<code>&#124;disp=sqbr</code> || data-sort-value="sqbr" | <code>sqbr</code>
| Join input and output using "&nbsp;[...]"
| Join input and output using "&nbsp;[...]"
| Join values
| Join values
|-
|-
|<code>&#124;disp=br</code> || data-sort-value="br" | br
|<code>&#124;disp=br</code> || data-sort-value="br" | <code>br</code>
| Join input and output using "&lt;br/>"
| Join input and output using "&lt;br/>"
| Join values
| Join values
|-
|-
|<code>&#124;disp=comma</code> || data-sort-value="comma" | comma
|<code>&#124;disp=comma</code> || data-sort-value="comma" | <code>comma</code>
| Join input and output using ",&nbsp;"
| Join input and output using ",&nbsp;"
| Join values
| Join values
|-
|-
|<code>&#124;disp=or</code> || data-sort-value="or" | or
|<code>&#124;disp=or</code> || data-sort-value="or" | <code>or</code>
| Join input and output using "&nbsp;or&nbsp;"
| Join input and output using "&nbsp;or&nbsp;"
| Join values
| Join values
|-
|-
|<code>&#124;disp=number</code> || data-sort-value="number" | number
|<code>&#124;disp=number</code> || data-sort-value="number" | <code>number</code>
| rowspan=2 | Display output number only
| rowspan=2 | Display output number only
| rowspan=2 | Parts only
| rowspan=2 | Parts only
|-
|-
|<code>&#124;disp=output number only</code> || data-sort-value="output number only" | output number only
|<code>&#124;disp=output number only</code> || data-sort-value="output number only" | <code>output number only</code>
|-
|-
|<code>&#124;disp=out</code> || data-sort-value="out" | out
|<code>&#124;disp=out</code> || data-sort-value="out" | <code>out</code>
| rowspan=2 | Display only output number and name/symbol
| rowspan=2 | Display only output number and name/symbol
| rowspan=2 | Parts only
| rowspan=2 | Parts only
|-
|-
|<code>&#124;disp=output only</code> || data-sort-value="output only" | output only
|<code>&#124;disp=output only</code> || data-sort-value="output only" | <code>output only</code>
|-
|-
|<code>&#124;disp=preunit&#124;…[&#124;…]</code> || data-sort-value="preunit" | preunit
|<code>&#124;disp=preunit&#124;…[&#124;…]</code> || data-sort-value="preunit" | <code>preunit</code>
| 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.
| 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
| Word adding
|-
|-
|<code>&#124;disp=table</code> || data-sort-value="table" | table
|<code>&#124;disp=table</code> || data-sort-value="table" | <code>table</code>
| Output is suitable for a table cell with align="right"
| Output is suitable for a table cell with align="right"
| Table columns
| Table columns
|-
|-
|<code>&#124;disp=tablecen</code> || data-sort-value="tablecen" | tablecen
|<code>&#124;disp=tablecen</code> || data-sort-value="tablecen" | <code>tablecen</code>
| Output is suitable for a table cell with align="center"  
| Output is suitable for a table cell with align="center"  
| Table columns
| Table columns
|-
|-
|<code>&#124;disp=unit</code> || data-sort-value="unit" | unit
|<code>&#124;disp=unit</code> || data-sort-value="unit" | <code>unit</code>
| Display input name/symbol only (not input number, not output)
| Display input name/symbol only (not input number, not output)
| Parts only
| Parts only
|-
|-
|<code>&#124;disp=unit2</code> || data-sort-value="unit2" | unit2
|<code>&#124;disp=unit2</code> || data-sort-value="unit2" | <code>unit2</code>
| Display output name/symbol only (not input; not output number)
| Display output name/symbol only (not input; not output number)
| Parts only
| Parts only
|-
|-
|<code>&#124;disp=x&#124;...</code> || data-sort-value="x" | x
|<code>&#124;disp=x&#124;...</code> || data-sort-value="x" | <code>x</code>
| Join input and output using user-specified text
| Join input and output using user-specified text
| Word adding
| Word adding
|-
|-
|<code>&#124;frac=''N''</code> || data-sort-value="N" | N
|<code>&#124;frac=</code>''N'' || data-sort-value="N" | &nbsp;&nbsp;''N''
| Show imperial number in fractions, denominator=''N''
| Show imperial number in fractions, denominator=''N''
| Number format, fraction
| Number format, fraction
|-
|-
|<code>&#124;input=P2048</code> || data-sort-value="property P2048" | P2048 {{small|1=(e.g.)}}
|<code>&#124;input=P2048</code> || data-sort-value="property P2048" | <code>P2048</code> {{small|1=(e.g.)}}
| Reads and converts Wikidata property  
| Reads and converts Wikidata property  
| Inside template
| Inside template
|-
|-
|<code>&#124;lk=in</code> || data-sort-value="in" | in
|<code>&#124;lk=in</code> || data-sort-value="in" | <code>in</code>
| Link left-hand side unit name or symbol
| Link left-hand side unit name or symbol
| Unit link
| Unit link
|-
|-
|<code>&#124;lk=on</code> || data-sort-value="on" | on
|<code>&#124;lk=on</code> || data-sort-value="on" | <code>on</code>
| Link all unit names or symbols (but not twice for the same unit)
| Link all unit names or symbols (but not twice for the same unit)
| Unit link
| Unit link
|-
|-
|<code>&#124;lk=out</code> || data-sort-value="out" | out
|<code>&#124;lk=out</code> || data-sort-value="out" | <code>out</code>
| Link right-hand side unit name or symbol
| Link right-hand side unit name or symbol
| Unit link
| Unit link
|-
|-
|<code>&#124;order=flip</code> || data-sort-value="flip" | flip
|<code>&#124;order=flip</code> || data-sort-value="flip" | <code>flip</code>
| Inverts order of input, output measurements (conversion first)
| Inverts order of input, output measurements (conversion first)
| Order
| Order
|-
|-
|<code>&#124;qid=Q1056131</code> || data-sort-value="qid Q1056131" | Q1056131 {{small|1=(e.g.)}}
|<code>&#124;qid=Q1056131</code> || data-sort-value="qid Q1056131" | <code>Q1056131</code> {{small|1=(e.g.)}}
| Reads Wikidata property from Wikidata item
| Reads Wikidata property from Wikidata item
| Inside template; testing
| Inside template; testing
|-
|-
|<code>&#124;round=5</code> || data-sort-value="05" | 5
|<code>&#124;round=5</code> || data-sort-value="05" | <code>5</code>
| Rounds calculation to the nearest multiple of 5
| Rounds calculation to the nearest multiple of 5
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;round=25</code> || data-sort-value="25" | 25
|<code>&#124;round=25</code> || data-sort-value="25" | <code>25</code>
| Rounds calculation to the nearest multiple of 25
| Rounds calculation to the nearest multiple of 25
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;round=each</code> || data-sort-value="each" | each
|<code>&#124;round=each</code> || data-sort-value="each" | <code>each</code>
| In a range, each number is rounded by the default rounding
| In a range, each number is rounded by the default rounding
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;sigfig=''N''</code> || data-sort-value="N" | N
|<code>&#124;sigfig=</code>''N'' || data-sort-value="N" | &nbsp;&nbsp;''N''
| Round output number to ''N'' significant figures (''N'' is a positive integer)
| Round output number to ''N'' significant figures (''N'' is a positive integer)
| Rounding and significant figures
| Rounding and significant figures
|-
|-
|<code>&#124;sortable=on</code> || data-sort-value="on" | on
|<code>&#124;sortable=on</code> || data-sort-value="on" | <code>on</code>
| Adds invisible sort key
| Adds invisible sort key
| Table sort
| Table sort
|-
|-
|<code>&#124;sp=us</code> || data-sort-value="us" | us
|<code>&#124;sp=us</code> || data-sort-value="us" | <code>us</code>
| Use U.S. spelling ("meter" instead of default "metre")
| Use U.S. spelling ("meter" instead of default "metre")
| Spelling U.S.&nbsp;names
| Spelling U.S.&nbsp;names
|-
|-
|<code>&#124;spell=in</code> || data-sort-value="in" | in
|<code>&#124;spell=in</code> || data-sort-value="in" | <code>in</code>
| Spell input number in words
| Spell input number in words
| Spelling numbers
| Spelling numbers
|-
|-
|<code>&#124;spell=In</code> || data-sort-value="In" | In
|<code>&#124;spell=In</code> || data-sort-value="In" | <code>In</code>
| Spell input number in words with first letter uppercase
| Spell input number in words with first letter uppercase
| Spelling numbers
| Spelling numbers
|-
|-
|<code>&#124;spell=on</code> || data-sort-value="on" | on
|<code>&#124;spell=on</code> || data-sort-value="on" | <code>on</code>
| Spell input and output numbers in words
| Spell input and output numbers in words
| Spelling numbers
| Spelling numbers
|-
|-
|<code>&#124;spell=On</code> || data-sort-value="On" | On
|<code>&#124;spell=On</code> || data-sort-value="On" | <code>On</code>
| Spell input and output numbers in words with first letter uppercase
| Spell input and output numbers in words with first letter uppercase
| Spelling numbers
| Spelling numbers
|-
|-
|<code>&#124;$=''&euro;''</code> || data-sort-value="&euro;" | &euro;
|<code>&#124;$=&euro;</code> || data-sort-value="&euro;" | <code>&euro;</code>
| Replace $-sign with a currency sign, for example in <code>$/acre</code> {{nowrap|(no currency conversion happens)}}
| Replace $-sign with a currency sign, for example in <code>$/acre</code> {{nowrap|(no currency conversion happens)}}
| Cost per unit
| Cost per unit
|-
|-
|<code>&#124;debug=yes</code> || data-sort-value="yes" | yes
|<code>&#124;debug=yes</code> || data-sort-value="yes" | <code>yes</code>
| '''Debugging only'''. In a sortable table: show the normally hidden sort key
| '''Debugging only'''. In a sortable table: show the normally hidden sort key
| Table sort
| Table sort
|- <!-- ----------------- Deprecated options ------------------------- -->
|- <!-- ----------------- Deprecated options ------------------------- -->
|<code>{{!mxt|1=&#124;disp=flip}}</code> || data-sort-value="flip" | flip
|<code>{{!mxt|1=&#124;disp=flip}}</code> || data-sort-value="flip" | <code>flip</code>
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| Order
| Order

Revision as of 02:51, 24 February 2018

Parameter Value Description Note
|abbr=in in Use symbol for first (left-hand side) unit Symbol ('abbreviation')
|abbr=off off Use name for all units Symbol ('abbreviation')
|abbr=none none
|abbr=on on Use symbol for all units Symbol ('abbreviation')
|abbr=out out Use symbol for right-hand side unit (default) Symbol ('abbreviation')
|abbr=unit unit Use symbol for all units when using scientific notation Symbol ('abbreviation')
|abbr=values values Show only input and output numbers, not units Parts only
|abbr=~ ~ Shows both unit name and symbol Symbol & name
|adj=mid|… mid User-specified text after the input unit; sets adj=on (adjective). Expects 1 unnamed parameter. Word adding, adjective
|adj=on on 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=ri0 ri0 Round input with precision 0 Rounding and significant figures
|adj=ri1 ri1 Round input with precision 1 Rounding and significant figures
|adj=ri2 ri2 Round input with precision 2 Rounding and significant figures
|adj=ri3 ri3 Round input with precision 3 Rounding and significant figures
|comma=5 5 Only use comma for thousands separator if 5 or more digits Number format
|comma=gaps gaps Use gaps (space), not comma, for thousands separator Number format
|comma=off off No thousands separator Number format
|disp=b b Join input and output using " (...)" (default) Join values
|disp=sqbr sqbr Join input and output using " [...]" Join values
|disp=br br Join input and output using "<br/>" Join values
|disp=comma comma Join input and output using ", " Join values
|disp=or or Join input and output using " or " Join values
|disp=number number Display output number only Parts only
|disp=output number only output number only
|disp=out out Display only output number and name/symbol Parts only
|disp=output only output 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=table table Output is suitable for a table cell with align="right" Table columns
|disp=tablecen tablecen Output is suitable for a table cell with align="center" Table columns
|disp=unit unit Display input name/symbol only (not input number, not output) Parts only
|disp=unit2 unit2 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
|frac=N   N Show imperial number in fractions, denominator=N Number format, fraction
|input=P2048 P2048 (e.g.) Reads and converts Wikidata property Inside template
|lk=in in Link left-hand side unit name or symbol Unit link
|lk=on on Link all unit names or symbols (but not twice for the same unit) Unit link
|lk=out out Link right-hand side unit name or symbol Unit link
|order=flip flip Inverts order of input, output measurements (conversion first) Order
|qid=Q1056131 Q1056131 (e.g.) Reads Wikidata property from Wikidata item Inside template; testing
|round=5 5 Rounds calculation to the nearest multiple of 5 Rounding and significant figures
|round=25 25 Rounds calculation to the nearest multiple of 25 Rounding and significant figures
|round=each each In a range, each number is rounded by the default rounding Rounding and significant figures
|sigfig=N   N Round output number to N significant figures (N is a positive integer) Rounding and significant figures
|sortable=on on Adds invisible sort key Table sort
|sp=us us Use U.S. spelling ("meter" instead of default "metre") Spelling U.S. names
|spell=in in Spell input number in words Spelling numbers
|spell=In In Spell input number in words with first letter uppercase Spelling numbers
|spell=on on Spell input and output numbers in words Spelling numbers
|spell=On On 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=yes yes Debugging only. In a sortable table: show the normally hidden sort key Table sort
|disp=flip flip Deprecated. Use |order=flip Order
|sing= Deprecated. Use |adj= Plurals