On November 27th, 2022, the 8,000th article was added to the SuccuWiki!
Template:Convert/basic
Purpose
Originally template {{convert}} used a complex system of {{#switch
}}s all fitting on one page. Let's call this version of the template Convert I.
Convert I was quite limited in terms of functionality and units covered. Users requested more but the problem with {{#switch
}}s is that they eat up the template limits. More units would mean bigger {{#switch
}}s and thus a slower template. {{ConvertW}} and {{convertV}} were created in Convert I's image to convert mass and volume respectively. Meanwhile work was being done on an alternative design.
In November 2007 Convert I was replaced with a new version, let's call it Convert II. The {{#switch
}}s were replaced with subpages. This subpage design has allowed for an enormous increase in the functionality and capacity of the template. It now handles hundreds of units and is capable of several ways of presenting the conversions.
Of course this comes at a cost. Convert I's single page is replaced by thousands of Convert II pages (yes, thousands). Many of these were added ad hoc over the years as new requests flowed in. The template has become somewhat difficult to work on. It's full of quirks, twists and knobbles. It could do with another overhaul. We now can make use of calculations not possible 2007 also we have different template limits to consider.
Convert III is in the works; it is, however, no easy task to rewrite a template like this. So, what do you do if you want to transwiki this template? You could wait for Convert III, you could get started on Convert II or you could even try your luck with Convert I. Before doing any of these why not have a look at {{convert/basic}} (this version)?
{{Convert/basic}} is based on the coding of Convert I in that it uses {{#switch
}}s. The functionality and capacity of {{convert/basic}} is a little better than Convert I (but still nowhere close to that of Convert II). The advantage is that you only have to transwiki a few templates. Use this until Convert III is working, use it whilst you're in the middle of transwikiing Convert II or, if a basic version is all you need, just use it (instead of Convert I).
- Units
length | area | volume | speed | mass | temperature | |
---|---|---|---|---|---|---|
metric |
|
|
|
|
|
|
imperial/US |
|
|
|
|
|
|
other |
|
|
|
- Parameters
3
|
The convert-to unit is optional. |
---|---|
4
|
The rounding is optional. |
lk
|
off (default), on , in or out
|
abbr
|
def (default), off , on , in or out
|
disp
|
paren (default), or or table
|
adj
|
off (default) or on
|
The above documentation is transcluded. Please add categories and interwikis to the /doc subpage. Subpages of this template. |