Template:Number: Difference between revisions
update templatedata for icon display |
Speedybrain (talk | contribs) No edit summary |
||
| Line 12: | Line 12: | ||
"format": { | "format": { | ||
"label": "Format", | "label": "Format", | ||
"description": "Force | "description": "Force one format for every reader: named or scientific. Leave it empty so readers see the format they chose under Appearance (preferred)", | ||
"example": "named", | "example": "named", | ||
"type": "string" | "type": "string" | ||
| Line 48: | Line 48: | ||
} | } | ||
}, | }, | ||
"description": " | "description": "Shows a large number as the game does, in the format each reader chose under Appearance: scientific notation (1.2e7, the default) or named numbers (12 M)", | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata> | </templatedata> | ||
Large numbers show in the format each reader picks under Appearance: scientific notation (1.2e7, the default) or named numbers (12 M). The other format is in the tooltip. Numbers below a million always show in full. | |||
== Examples == | == Examples == | ||
{| class="wikitable" | {| class="wikitable" | ||
Revision as of 20:53, 6 October 2026
Shows a large number as the game does, in the format each reader chose under Appearance: scientific notation (1.2e7, the default) or named numbers (12 M)
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Number | 1 | The number to display (in long form or scientific notation)
| Number | required |
| Format | format | Force one format for every reader: named or scientific. Leave it empty so readers see the format they chose under Appearance (preferred)
| String | optional |
| Prefix | prefix | Add an optional prefix to the number
| String | optional |
| Suffix | suffix | Add an optional suffix to the number
| String | optional |
| Sort Key | sortkey | Specify a custom sort key to override default table number sorting
| String | optional |
| Icon | icon | Add an icon (e.g. for resource display)
| String | optional |
| Icon Position | iconpos | Position of the icon (if specified), 'left' places it on the left, otherwise defaults to the right
| String | optional |
Large numbers show in the format each reader picks under Appearance: scientific notation (1.2e7, the default) or named numbers (12 M). The other format is in the tooltip. Numbers below a million always show in full.