dreamworkAPI
Ctrl K
GitHub
typeDocs / fluent / NumberOptions

fluent.NumberOptions

typesharedmenusource

The options of fluent.Number and NUMBER, a subset of Intl.NumberFormat options.

style and currency can be set only from Lua, translators can not change them.

Fields

NameTypeDescription
style"decimal" | "percent" | "currency" | nilThe formatting style, "decimal" by default.
currencystring | nilThe ISO 4217 currency code, e.g. "USD", required by the "currency" style.
currencyDisplay"symbol" | "narrowSymbol" | "code" | "name" | nilHow the currency is displayed, "symbol" by default, "name" falls back to the code.
useGroupingboolean | "always" | "auto" | "min2" | "true" | "false" | nilWhether the integer digits are grouped, locale dependent ( "auto" ) by default.
minimumIntegerDigitsinteger | nilThe minimum number of integer digits, 1 by default.
minimumFractionDigitsinteger | nilThe minimum number of fraction digits, 0 by default ( 2 for most currencies ).
maximumFractionDigitsinteger | nilThe maximum number of fraction digits, 3 by default ( 0 for percents, 2 for most currencies ).
minimumSignificantDigitsinteger | nilThe minimum number of significant digits, 1 by default, overrides the fraction digits.
maximumSignificantDigitsinteger | nilThe maximum number of significant digits, 21 by default, overrides the fraction digits.
type"cardinal" | "ordinal" | nilThe plural rule used to select variants, "cardinal" by default.
Generated from the dreamwork meta branch.