SymbolLocaleFormatter

The LocaleFormatter the renderer ships: LocaleData's symbols, this module's assembly.

One instance holds one locale. The four functions are pure in their arguments — the data is read once, at construction, so a formatter cannot start answering differently halfway through a frame because the device's settings changed under it.

See also

for why the assembly is shared across targets instead of delegated to each.

Constructors

Link copied to clipboard
constructor(data: LocaleData)

Properties

Link copied to clipboard

The BCP 47 tag this formatter resolved to, which is not always the one that was asked for.

Functions

Link copied to clipboard
open override fun formatCurrency(value: Double, currency: String, decimals: Int?, grouping: Boolean): String

value in currency, with the locale's affixes around it.

Link copied to clipboard
open override fun formatDate(epochMillis: Long, pattern: String): String
Link copied to clipboard
open override fun formatNumber(value: Double, decimals: Int?, grouping: Boolean): String

value as a decimal string.

Link copied to clipboard
open override fun pluralCategory(value: Double): PluralCategory

Which CLDR plural category value falls into for this formatter's locale.