I18n4kConfigImmutable

data class I18n4kConfigImmutable(val defaultLocale: Locale, val locale: Locale, val messageFormatter: MessageFormatter, val treadBlankStringAsNull: Boolean, val ignoreMessageParseErrors: Boolean, val genderProvider: GenderProvider, val declensionProvider: DeclensionProvider) : I18n4kConfig

Implementation of I18n4kConfig that is immutable (for state engines like React).

Can be used in combination with I18n4kConfigDelegate, which should return the current config from the state.

Constructors

Link copied to clipboard
constructor()

constructor for getting the default settings

constructor(defaultLocale: Locale, locale: Locale, messageFormatter: MessageFormatter, treadBlankStringAsNull: Boolean, ignoreMessageParseErrors: Boolean, genderProvider: GenderProvider, declensionProvider: DeclensionProvider)

Properties

Link copied to clipboard

Provider used for declension requests

Link copied to clipboard
open override val defaultLocale: Locale

Fallback locale when a string in the currently set locale are not found

Link copied to clipboard
open override val genderProvider: GenderProvider

Provider used for gender requests

Link copied to clipboard

if true, error during parsing of messages will be ignored and the message will be printed without the invalid part.

Link copied to clipboard
open override val locale: Locale

currently set locale

Link copied to clipboard

the format of the parameters

Link copied to clipboard
open override val treadBlankStringAsNull: Boolean

if a string of a localisation is null, the default locale is used. If this flag is true, blank strings (empty of only whitespace) are also threaded as null.

Functions

Link copied to clipboard
Link copied to clipboard