Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Convert/doc
(section)
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Words== ===Spelling of unit name: international ''metre'' or US ''meter''?=== Default spelling of units is in the en (generic) locale. To show en-US spelling, use {{para|sp|us}}: :<code><nowiki>{{convert|1|m|ft}}</nowiki></code> β {{convert|1|m|ft}}β''default'' :<code><nowiki>{{convert|1|m|ft|sp=us}}</nowiki></code> β {{convert|1|m|ft|sp=us}} ===<span id="spell"></span>Spell out numbers: ''ten miles''=== To write a number in words, use {{para|spell|in}}: * <code><nowiki>{{convert|10|mi|m|spell=in}}</nowiki></code> β {{convert|10|mi|m|spell=in}} To spell out both in and out values, use {{para|spell|on}}: * <code><nowiki>{{convert|10|mi|m|spell=on}}</nowiki></code> β {{convert|10|mi|m|spell=on}} To make the first letter a capital, use {{para|spell|In}}, {{para|spell|On}} * <code><nowiki>{{convert|10|mi|m|spell=In}}</nowiki></code> β {{convert|10|mi|m|spell=In}} * <code><nowiki>{{convert|10|mi|m|spell=On}}</nowiki></code> β {{convert|10|mi|m|spell=On}} ===Inserted before units: ''4 planted acres''=== *<code><nowiki>{{convert|4|acre||adj=pre|planted}}</nowiki></code> β {{convert|4|acre||adj=pre|planted}} <code>disp=preunit</code> is similar, but has no separator after the specified text, and can have different text for the output value: *<code><nowiki>{{convert|4|acre||disp=preunit|planted }}</nowiki></code> β {{convert|4|acre||disp=preunit|planted }} *<code><nowiki>{{convert|4|acre||disp=preunit|planted |reforested-}}</nowiki></code> β {{convert|4|acre||disp=preunit|planted |reforested-}} ===After adjective unit: ''A {{convert|10|ft|ft|adj=mid|-long|disp=out|order=flip}} corridor''=== Note that two units (in this case, ft and m) are required. Use with just one unit will generate an error message. :<code><nowiki>{{convert|10|ft|m|adj=mid|-long}}</nowiki></code> β {{convert|10|ft|m|adj=mid|-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. * <code><nowiki>{{convert|1|metre}}</nowiki></code> β {{convert|1|metre}} * <code><nowiki>{{convert|2|metre}}</nowiki></code> β {{convert|2|metre}} * <code><nowiki>{{convert|2|metre|abbr=on}}</nowiki></code> β {{convert|2|metre|abbr=on}} ;Exception: Entering the unit "foot" instead of "ft" forces singular output "foot", whatever the number is. * <code><nowiki>{{convert|100|foot|abbr=off}}</nowiki></code> β {{convert|100|foot|abbr=off}} ===Fractions: ''one-eighth of an imperial pint''=== The convert template also supports spelling out fractions. * <code><nowiki>{{convert|3+1/2|oz|g|spell=in}}</nowiki></code> β {{convert|3+1/2|oz|g|spell=in}} Any additional words needed for the fraction can also be added at the end of the template. * <code><nowiki>{{convert|1/8|imppt|ml|spell=in|adj=pre|of an}}</nowiki></code> β {{convert|1/8|imppt|ml|spell=in|adj=pre|of an}} <!-- todo: decimals & negative examples --> ===Wrapping and line breaking=== :See {{section link|Help:Convert|Wrapping and line breaking}} ===<span id="million"></span>Spelling out "thousands", "millions", etc.=== Most unit codes accept a prefix of e3 (thousand) or e6 (million) or e9 (billion). * <code><nowiki>{{convert|100|e6mi|e6km}}</nowiki></code> β {{convert|100|e6mi|e6km}} * <code><nowiki>{{convert|120|e6acre}}</nowiki></code> β {{convert|120|e6acre}} * <code><nowiki>{{convert|120|e6acre|e3km2}}</nowiki></code> β {{convert|120|e6acre|e3km2}} To display both input and output in scientific notation, use {{para|abbr|on}} * <code><nowiki>{{convert|100|e6mi|e6km|abbr=on}}</nowiki></code> β {{convert|100|e6mi|e6km|abbr=on}} To spell out "thousands", "millions", etc., {{para|abbr|unit}} abbreviates the unit; {{para|abbr|off}} displays both full unit names. * <code><nowiki>{{convert|100|e6mi|e6km|abbr=unit}}</nowiki></code> β {{convert|100|e6mi|e6km|abbr=unit}} * <code><nowiki>{{convert|100|e6mi|e6km|abbr=off}}</nowiki></code> β {{convert|100|e6mi|e6km|abbr=off}}
Summary:
Please note that all contributions to Bourbon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Bourbon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width