LocalizedStringFactoryMap

A simple implementation of LocalizedStringFactoryN that maps a locale values to string values.

Attributes may also be specified with the attributes parameter.

Constructors

Link copied to clipboard
constructor(vararg messages: Pair<Locale, String>, attributes: LocalizedAttributable? = null)
constructor(messages: Map<Locale, String>, attributes: LocalizedAttributable?)

Functions

Link copied to clipboard

Create LocalizedString with the given parameter

Link copied to clipboard
open override fun createString(parameters: MessageParameters, locale: Locale?): String

Create a string with the given parameter

Link copied to clipboard
open operator fun get(parameters: MessageParameters): LocalizedString
open operator fun get(vararg parameters: Pair<String, Any>): LocalizedString

applies the parameter pairs and creates the LocalizedString instance

Link copied to clipboard
open operator fun invoke(parameters: MessageParameters, locale: Locale? = null): String

Shortcut for createString

open operator fun invoke(vararg parameters: Pair<String, Any>, locale: Locale? = null): String

applies the parameter pairs and creates the string