Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Convert/doc/parameter list

From Wikipedia, the free encyclopedia
Parameter Value Description Note
|abbr=inin Use symbol for first (left-hand side) unit Unit display
|abbr=offoff Use name for all units Unit display
|abbr=onon Use symbol for all units (default for {{cvt}}) Unit display
|abbr=outout Use symbol for right-hand side unit (default) Unit display
|abbr=unitunit Same as abbr=on but only for units (e6km → "million km") Unit display
|abbr=valuesvalues Show only the input and output numbers; omit units Unit display
|abbr=~~ Shows both unit name and symbol for the input Unit display
|adj=mid|...mid User-specified text after the input unit; sets adj=on (adjectival); requires one unnamed parameter Word adding, adjectival
|adj=onon adjectival; unit name is singular and hyphenated Grammar, adjectival
|adj=pre|...pre User-specified text before input unit (prefix); requires one unnamed parameter Word adding
|adj=ri0ri0 Round input with precision 0 Input precision
|adj=ri1ri1 Round input with precision 1 Input precision
|adj=ri2ri2 Round input with precision 2 Input precision
|adj=ri3ri3 Round input with precision 3 Input precision
|altitude_ft=NN Specifies altitude in feet for a conversion with mach as the input unit Qualifier
|altitude_m=NN Specifies altitude in metres for a conversion with mach as the input unit Qualifier
|comma=55 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=offoff No thousands separator (raw number) Number format
|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=br()br Join input and output using "<br />(...)" Join values
|disp=commacomma Join input and output using ", " Join values
|disp=semicolonsemicolon Join input and output using "; " Join values
|disp=oror Join input and output using " or " Join values
|disp=(or)or Join input and output using " (...)" but with "or" between outputs in a combination 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; requires 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 one (or two) unnamed parameter(s) before (and after) the output Word adding
|error=xany text This has no effect if the conversion works; if a conversion error occurs, the result is x (and the original error message is suppressed) Inside template
|frac=N34 (e.g.) Show number as a fraction with denominator N Number format, fraction
|frac=-N3/4 (e.g.) Show number as a fraction with a horizontal bar Number format, fraction
|input=P2048P2048 (e.g.) Reads and converts a Wikidata property Inside template
|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 Swaps the order of the input and output measurements Order
|order=outout Displays output units in the order entered, skipping input unit Order
|qid=Q1056131Q1056131 (e.g.) Specifies the Wikidata entity to be used with a property such as input=P2048 Inside template; testing
|qual=Q613628Q613628 (e.g.) Specifies a statement qualifier for a Wikidata property Qualify Wikidata property
|round=NN Rounds output value to nearest N which can be 0.5 or 1 or 5 or 10 or 25 or 50 Output precision
|round=eacheach In a range, round each number separately rather than selecting the same rounding precision Output precision
|sigfig=NN Round output number to N significant figures (N is a positive integer) Output precision
|sortable=onon Adds an invisible sort key Table sort
|sp=usus Use U.S. spelling ("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 /hectare Cost per unit
No currency conversion happens
|debug=yesyes Debugging only. In a sortable table: show the normally hidden sort key Table sort
|disp=flipflip Deprecated. Use |order=flip Order
|sing= Deprecated. Use |adj= Plurals