MessageBundle

open class MessageBundle @JvmOverloads constructor(val messageBundleName: String = "", val messageBundlePackage: String = "")

Base class for bundles of messages.

Messages are referenced by indexes. Sub-classes should define constants with the indexes to access the messages

Also manages a map of locales to translations (MessagesProvider)

Constructors

Link copied to clipboard
constructor(messageBundleName: String = "", messageBundlePackage: String = "")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Locales registered to this bundle

Link copied to clipboard

Name of the bundle. Empty string for none.

Link copied to clipboard

Package of the bundle. Empty string for none.

Functions

Link copied to clipboard
Link copied to clipboard

Returns the entry registered for the given key.

Link copied to clipboard
fun registerTranslation(messagesProvider: MessagesProvider)

Add or replaces a translation in this message bundle

Link copied to clipboard

Add or replaces a translation in this message bundle. Loaded asynchronously by the factory.

Link copied to clipboard

Remove all registered translations (see registerTranslation)