Template:Unit: Difference between revisions
From Eco - English Wiki
[unchecked revision] | [unchecked revision] |
(Improve documentation.) |
m (Improve documentation.) |
||
Line 29: | Line 29: | ||
! Code !! Result | ! Code !! Result | ||
|- | |- | ||
| {{tlx|Template Sandbox/Demian/Unit| | | {{tlx|Template Sandbox/Demian/Unit|mHz}} || {{Template Sandbox/Demian/Unit|mHz}} | ||
|- | |- | ||
| {{tlx|Template Sandbox/Demian/Unit| | | {{tlx|Template Sandbox/Demian/Unit|MHz}} || {{Template Sandbox/Demian/Unit|MHz}} | ||
|- | |- | ||
| {{tlx|Template Sandbox/Demian/Unit|m2}} || {{Template Sandbox/Demian/Unit|m2}} | | {{tlx|Template Sandbox/Demian/Unit|m2}} || {{Template Sandbox/Demian/Unit|m2}} | ||
Line 42: | Line 42: | ||
|- | |- | ||
| {{tlx|Template Sandbox/Demian/Unit|J/(Kmol)}} || {{Template Sandbox/Demian/Unit|J/(Kmol)}} | | {{tlx|Template Sandbox/Demian/Unit|J/(Kmol)}} || {{Template Sandbox/Demian/Unit|J/(Kmol)}} | ||
|} | |||
If a unit definition is not found, the abbreviation (or text) is returned unchanged. | |||
{| class="wikitable" | |||
|+ Invalid units. | |||
|- | |||
! Code !! Result | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|things}} || {{Template Sandbox/Demian/Unit|things}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|something/other}} || {{Template Sandbox/Demian/Unit|something/other}} | |||
|- | |||
| {{tlx|Template Sandbox/Demian/Unit|players per hour}} || {{Template Sandbox/Demian/Unit|players per hour}} | |||
|} | |} | ||
Revision as of 00:47, 25 February 2022
Usage
{{Template Sandbox/Demian/Unit|abbr}}
Examples
Note that the abbreviation is case sensitive and special symbols are formatted correctly:
If a unit definition is not found, the abbreviation (or text) is returned unchanged.
Code | Result |
---|---|
{{Template Sandbox/Demian/Unit|things}} |
Template:Template Sandbox/Demian/Unit |
{{Template Sandbox/Demian/Unit|something/other}} |
Template:Template Sandbox/Demian/Unit |
{{Template Sandbox/Demian/Unit|players per hour}} |
Template:Template Sandbox/Demian/Unit |
Modules
This template is using the following Modules:
Documentation
Adds a tooltip to an abbreviation of a unit of measure showing the actual name of the unit.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Unit abbreviation | abbr | Case sensitive abbreviation of a unit of measure. If the abbreviation contains a forward slash "/" it may be replaced with the character "p".
| String | required |