IMessageProvider

interface IMessageProvider<C>

Interface for a message provider that handles localized messages.

Parameters

C

The type of the message content (e.g., String, Component).

Inheritors

Functions

Link copied to clipboard
abstract fun getLanguage(): String

Retrieves the language code associated with this provider.

Link copied to clipboard
abstract fun getMessage(key: MessageKey<*, *>, vararg args: Any): C

Retrieves a formatted localized message based on the provided key and optional arguments.

abstract fun <K, V> getMessage(key: MessageKey<*, *>, argsComplete: Map<K, V>): C

Retrieves a formatted localized message using a map of named arguments.

abstract fun <T, K, V> getMessage(key: MessageKey<*, *>, intermediate: T, transform: (T) -> Map<K, V>): C

Retrieves a formatted localized message using an intermediate data type.

Link copied to clipboard
abstract fun getRawMessage(key: MessageKey<*, *>): String

Retrieves the raw message string for the provided key without formatting.

Link copied to clipboard
abstract fun hasMessage(key: MessageKey<*, *>): Boolean

Checks if a localized message exists for the given key.