Difference between revisions of "Template:Lb to kg"

From Teampedia
Jump to: navigation, search
(Created page with "{{convert/{{#ifeq:{{{4}}}|oz|and/oz|{{{d}}}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|s={{{s|}}}|r={{{r}}}|d={{{d}}} |u=lb |n=ポンド |l=ポンド |t=ポンド...")
 
Line 1: Line 1:
{{convert/{{#ifeq:{{{4}}}|oz|and/oz|{{{d}}}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|s={{{s|}}}|r={{{r}}}|d={{{d}}}
+
<noinclude>;Usage:
|u=lb
+
:<nowiki>{{lb to kg | num | abbr | spell | precision | wiki}}</nowiki>
|n=ポンド
+
 
|l=ポンド
+
;Examples:
|t=ポンド (質量)
+
:''[[WP:MOSNUM#Units of measurement|Manual of Style]] notation'':<nowiki>{{convert|100|lb|kg}}</nowiki>&nbsp;&rarr; {{convert|100|lb|kg}}
|o=kg
+
:''Short notation'': <nowiki>{{convert|100|lb|kg|100|abbr=yes}}</nowiki>&nbsp;&rarr; {{convert|100|lb|kg|100|abbr=yes}}
|b=0.45359237
+
:''Full notation'': <nowiki>{{convert|100|lb|kg|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}</nowiki>&nbsp;&rarr; {{convert|100|lb|kg|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}
|j=-0.343334259-{{{j|0}}}}}<noinclude>
+
 
[[Category:Subtemplates of Template Convert]]
+
''Italicized'' parameters are optional:
 +
*'''num''' is a required parameter, which specifies the number of pounds to be converted to kilograms.  Please do not format this parameter; i.e., use 1234 instead of 1,234.
 +
*'''''abbr''''' can take values of either ''mos'', ''yes'', or ''no''.  ''Mos'' will show the names of the units as specified in the [[WP:MOSNUM#Units of measurement|Manual of Style for dates and numbers]] (pounds, kg); ''yes'' will show the abbreviated names of the units (lb, kg); and ''no'' will show the full names of the units (pounds, kilograms).  The default value is ''mos''.
 +
*'''''spell''''' can take values of ''American'' or ''Commonwealth'' and is only meaningful when ''abbr'' is set to ''no''.  ''American'' will use "kilograms", and ''Commonwealth''&mdash;"kilogrammes".  The default value is ''American''.
 +
*'''''precision''''' is the number of decimal digits in the converted value.  The default value is&nbsp;0.
 +
*'''''wiki''''' specifies whether the names of the units should be wikified or not and can take values of either ''yes'' or ''no''. The default value is ''no''.
 +
 
 +
Capitalization of the parameters is unimportant.</noinclude><includeonly>{{FORMATNUM:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}&nbsp;{{#ifexpr:({{#ifeq:{{LC:{{{abbr|mos}}}}}|mos|1|0}} OR {{#ifeq:{{LC:{{{abbr|mos}}}}}|no|1|0}})|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[pound (mass)|pounds]]|pounds}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[pound (mass)|lb]]|lb}}}} ({{FORMATNUM:{{#expr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}*0.45359237 round {{{precision|0}}}}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{spell|american}}}}}|commonwealth|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|kilogrammes|[[kilogram]]mes}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|kilograms|[[kilogram]]s}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|kg|[[kilogram|kg]]}}}})</includeonly><noinclude>
 +
==See also==
 +
*{{tl|convert}}
 +
 
 +
[[Category:Conversion templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 14:37, 11 April 2020

Usage
{{lb to kg | num | abbr | spell | precision | wiki}}
Examples
Manual of Style notation:{{convert|100|lb|kg}} → 100  (Expression error: Missing operand for *. )
Short notation: {{convert|100|lb|kg|100|abbr=yes}} → 100  (Expression error: Unexpected round operator. )
Full notation: {{convert|100|lb|kg|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 100  (Expression error: Missing operand for *. )

Italicized parameters are optional:

  • num is a required parameter, which specifies the number of pounds to be converted to kilograms. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • abbr can take values of either mos, yes, or no. Mos will show the names of the units as specified in the Manual of Style for dates and numbers (pounds, kg); yes will show the abbreviated names of the units (lb, kg); and no will show the full names of the units (pounds, kilograms). The default value is mos.
  • spell can take values of American or Commonwealth and is only meaningful when abbr is set to no. American will use "kilograms", and Commonwealth—"kilogrammes". The default value is American.
  • precision is the number of decimal digits in the converted value. The default value is 0.
  • wiki specifies whether the names of the units should be wikified or not and can take values of either yes or no. The default value is no.

Capitalization of the parameters is unimportant.

See also