Ашаблон:Convert/doc
Внешний вид
Ари ашаблон Lua апрограммаҟаҵаратә бызшәа ахархәара аҭатәуп: |
Ашаблон {{convert}} calculates a measurement value (number × unit) into the same measurement by a different unit, and then presents the results, formatted. The complete list of unit symbols recognized by the template is here.
For example:
{{convert|2|km|mi}}
→ 2 kilometres (1.2 mi) (km entered, converted into miles){{convert|7|mi|km}}
→ 7 miles (11 km) (mi entered, converted into km)
Numbers can be rounded, units can be abbreviated into symbols:
{{convert|2|km|mi|2|abbr=on}}
→ 2 km (1.24 mi){{convert|7|mi|km|2|abbr=on}}
→ 7 mi (11.27 km)
Value ranges can be entered using |to|...
or |-|...
:
{{convert|2|to|5|km|mi}}
→ 2 to 5 kilometres (1.2 to 3.1 mi){{convert|2|-|5|km|mi}}
→ 2–5 kilometres (1.2–3.1 mi)
Combined effect example:
{{convert|2|-|5|km|mi|2|abbr=on}}
→ 2–5 km (1.24–3.11 mi){{convert|2|and|5|km|mi|sigfig=3|abbr=off}}
→ 2 and 5 kilometres (1.24 and 3.11 miles)