Content deleted Content added
No edit summary |
Added the page to Category:Module documentation pages |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1:
{{high-use|212}}
This module can be used to quickly add a new unit for use with {{tl|convert}}. When satisfied that a unit is working correctly, ask at [[Module talk:Convert]] for the unit to be moved to the permanent list of units.
See [[Template:Convert/unit sandbox]] for a good way to prepare unit definitions that can be copied into this page.
The following extracts from [[Module:Convert/data]] show examples that could be used to define a new unit. Any number of spaces can be used where blanks are shown in the following.
{{collapse top|title=Examples for additions to <
<syntaxhighlight lang="lua" highlight="1">
-- These are EXAMPLES on the documentation page. Scroll down to see the module content.
Line 58 ⟶ 63:
-- {{convert|125|g/m3|lk=on|disp=unit}} → [[density|grams per cubic metre]]
["g/m3"] = {
per
utype
default
link
},
-- Characters "$" and "£" are recognized as currency symbols.
Line 89 ⟶ 94:
}
</syntaxhighlight>
{{collapse bottom}}
{| class="wikitable"
! Field !! Description
Line 115 ⟶ 122:
| <code>link</code> || Article title used when <code>lk=on</code> is in effect; not required if it is the same as <code>name1</code>.
|}
{{anchor|EndOfDoc}}
<noinclude>
[[Category:Module documentation pages]]
</noinclude>
|