<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fdoc</id>
	<title>Module:Convert/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AConvert%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Convert/doc&amp;action=history"/>
	<updated>2026-11-24T06:23:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://battleint.net/index.php?title=Module:Convert/doc&amp;diff=176588&amp;oldid=prev</id>
		<title>imported&gt;Deadfire: Updating</title>
		<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Convert/doc&amp;diff=176588&amp;oldid=prev"/>
		<updated>2023-10-20T15:56:07Z</updated>

		<summary type="html">&lt;p&gt;Updating&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Lua|Module:Convert/data|Module:Convert/text|Module:Convert/wikidata|Module:Convert/wikidata/data|Module:Convert/extra|Module:ConvertNumeric|noprotcat=yes}}&lt;br /&gt;
{{Uses TemplateStyles|Template:Fraction/styles.css|Template:Sfrac/styles.css|noprotcat=yes}}&lt;br /&gt;
This module converts a value from one unit of measurement to another. For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{convert|123|lb|kg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → 123 pounds (56 kg)&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;kg&amp;lt;/code&amp;gt;), or displayed as names (like &amp;lt;code&amp;gt;kilogram&amp;lt;/code&amp;gt;), and the output value can be rounded to a specified precision. For usage information, see [[Help:Convert]].&lt;br /&gt;
&lt;br /&gt;
== Templates and modules ==&lt;br /&gt;
Templates that invoke this module are:&lt;br /&gt;
* [[Template:Convert]]&lt;br /&gt;
* [[Template:Cvt]] {{green|1=(convert with abbr=on)}}&lt;br /&gt;
&lt;br /&gt;
The following modules are required:&lt;br /&gt;
* [[Module:Convert]] – &amp;#039;&amp;#039;(this module)&amp;#039;&amp;#039; code to convert units&lt;br /&gt;
* [[Module:Convert/data]] – unit definitions&lt;br /&gt;
* [[Module:Convert/text]] – text messages, and parameter names and values&lt;br /&gt;
&lt;br /&gt;
For Wikidata support the following modules are required:&lt;br /&gt;
* [[Module:Convert/wikidata]]&lt;br /&gt;
* [[Module:Convert/wikidata/data]]&lt;br /&gt;
&lt;br /&gt;
The following modules are optional and are used only if required and if the module exists:&lt;br /&gt;
* [[Module:Convert/extra]] – extra (temporary) unit definitions; used if a unit is not found in [[Module:Convert/data]]&lt;br /&gt;
* [[Module:ConvertNumeric]] – code to spell an input value in words&lt;br /&gt;
&lt;br /&gt;
The following help pages are available:&lt;br /&gt;
* [[Help:Convert]] – overview&lt;br /&gt;
* [[Help:Convert messages]] – describes error and warning messages; messages link to this page so it is required when the module is copied to another wiki&lt;br /&gt;
* [[Help:Convert units]] – overview of units&lt;br /&gt;
&lt;br /&gt;
A page containing a convert error is added to the following hidden category, providing the page is in a specified namespace (articles, by default):&lt;br /&gt;
* {{clc|Convert errors}}&lt;br /&gt;
&lt;br /&gt;
Units are defined in the wikitext of the master list of units.&lt;br /&gt;
* [[Module:Convert/documentation/conversion data]] – master list of unit definitions&lt;br /&gt;
* [[Module:Convert/makeunits]] – translates wikitext from the master list to Lua&lt;br /&gt;
* [[Module talk:Convert/makeunits]] – makeunits results; copy the text to [[Module:Convert/data]]&lt;br /&gt;
&lt;br /&gt;
[[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.&lt;br /&gt;
&lt;br /&gt;
[[Module talk:Convert/show]] lists all unit links so they can be checked.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The template that invokes this module can define options to configure the module. For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:convert|convert|numdot=,|numsep=.}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:Sets the decimal mark to be a comma, and the thousands separator to be a dot.&lt;br /&gt;
&lt;br /&gt;
Other options, with default values, are:&lt;br /&gt;
* &amp;lt;code&amp;gt;|maxsigfig=14&amp;lt;/code&amp;gt; – maximum number of significant figures&lt;br /&gt;
* &amp;lt;code&amp;gt;|nscat=0&amp;lt;/code&amp;gt; – namespaces (comma separated) in which an error or warning adds a category to the page&lt;br /&gt;
* &amp;lt;code&amp;gt;|warnings=0&amp;lt;/code&amp;gt; – 0 (zero) disables warnings; 1 shows important warnings; 2 shows all warnings&lt;br /&gt;
&lt;br /&gt;
An option in the template can specify that the sandbox versions of the modules be used. If specified, the text on the right-hand side of the equals sign must be the name of the subpage for each sandbox module.&lt;br /&gt;
* &amp;lt;code&amp;gt;|sandbox=sandbox&amp;lt;/code&amp;gt; – omit for normal operation&lt;br /&gt;
&lt;br /&gt;
All text used for input parameters and for output messages and categories can be customized. For example, at enwiki the option &amp;lt;code&amp;gt;|lk=on&amp;lt;/code&amp;gt; can be used to link each displayed unit to its article. The &amp;quot;&amp;lt;code&amp;gt;lk&amp;lt;/code&amp;gt;&amp;quot; and &amp;quot;&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&amp;quot; can be replaced with any desired text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Deadfire</name></author>
	</entry>
</feed>