Template:Formatnum/doc

From FamilySearch Wiki
Jump to: navigation, search

This template formats a number in the local format (local numerals, local thousands separator, decimal separator and the pattern of separators [some languages for example have a ten-thousands separator]) of the user's preferred language

Usage

{{Formatnum|1=|2=|sep=|prec=}}

Parameters

Parameter name Description Default value required or optional?

parameter #1 (1) number, that shall be formatted in local format (must be unformatted [without thousands separators]) empty required
parameter #2 (2) language code (only needs to be provided if the language shall be fixed and independent from the user's preferences) value of {{int:Lang}} optional
sep set to any non-empty value to remove thousands separators (e.g. for dates) empty optional
prec decimal place, minimal number of bytes behind the decimal point to show, this needs to be set, if zeros at the end of the number shall be visible (0.100 will be converted to 0.1 without specifying this parameter) empty optional

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: all users

Relies on:
Module:Formatnum

See also

{{Formatnum4}} for numbers 4 digits or shorter.

Examples

Remark


Retrieved from "https://familysearch.org/wiki/en/index.php?title=Template:Formatnum/doc&oldid=1559776"