跳至內容

模組:Convert/doc

維基百科,自由的百科全書

此頁面為 Module:Convert 的說明文件

本模塊將一種單位制下的數值轉換到另一種單位制下。舉例:

  • {{convert|123|lb|kg}} → 123 pounds (56 kg)

The module is called using a template—parameters passed to the template are used by this module to control how a conversion is performed. For example, units can be abbreviated (like kg), or displayed as names (like kilogram), and the output value can be rounded to a specified precision. For usage information, see Help:Convert.

模板和模塊

使用本模塊的模板:

The following modules are required:

The following modules are optional and are used only if required and if the module exists:

For Wikidata support the following modules are required:

The following help pages are available:

A page containing a convert error is added to the following hidden category, providing the page is in a specified namespace (articles, by default):

Units are defined in the wikitext of the master list of units.

Module:Convert/data is transcluded into every page using the convert module, so experimenting with a new unit in that module would involve a significant overhead. The Module:Convert/extra module is an alternative which is only transcluded on pages with a unit that is not defined in the main data module.