fluent.NumberOptions
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
| Name | Type | Description |
|---|---|---|
style | "decimal" | "percent" | "currency" | nil | The formatting style, "decimal" by default. |
currency | string | nil | The ISO 4217 currency code, e.g. "USD", required by the "currency" style. |
currencyDisplay | "symbol" | "narrowSymbol" | "code" | "name" | nil | How the currency is displayed, "symbol" by default, "name" falls back to the code. |
useGrouping | boolean | "always" | "auto" | "min2" | "true" | "false" | nil | Whether the integer digits are grouped, locale dependent ( "auto" ) by default. |
minimumIntegerDigits | integer | nil | The minimum number of integer digits, 1 by default. |
minimumFractionDigits | integer | nil | The minimum number of fraction digits, 0 by default ( 2 for most currencies ). |
maximumFractionDigits | integer | nil | The maximum number of fraction digits, 3 by default ( 0 for percents, 2 for most currencies ). |
minimumSignificantDigits | integer | nil | The minimum number of significant digits, 1 by default, overrides the fraction digits. |
maximumSignificantDigits | integer | nil | The maximum number of significant digits, 21 by default, overrides the fraction digits. |
type | "cardinal" | "ordinal" | nil | The plural rule used to select variants, "cardinal" by default. |