Package-level declarations

Types

Link copied to clipboard
class DefaultLocalizationMap(val effectiveLocale: Locale, localizationMap: Map<String, LocalizationTemplate?>) : LocalizationMap
Link copied to clipboard

Default implementation for LocalizationTemplate.

Link copied to clipboard
Helper class to translate framework-specific messages.
Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface DefaultMessagesFactory

Factory for DefaultMessages instances, using locales from various sources.

Link copied to clipboard

Allows you to configure the localization settings of this interaction/command, as well as retrieve a localization context from it.

Link copied to clipboard
Low-level interface for localization.
Link copied to clipboard
interface LocalizationMap

Common interface to retrieve localization templates from a path.

Link copied to clipboard
Link copied to clipboard
@InterfacedService(acceptMultiple = false)
interface LocalizationService

Service to retrieve Localization instances with the requested name and locale.

Link copied to clipboard

Represents an entire localizable string, with parameters.

Functions

Link copied to clipboard
Link copied to clipboard
fun LocalizableAction.getLocalizedMessage(locale: Locale, localizationPath: String, vararg entries: PairEntry): String
fun LocalizableAction.getLocalizedMessage(locale: DiscordLocale, localizationPath: String, vararg entries: PairEntry): String
Link copied to clipboard

Processes the localization template and replaces the named parameters by their values

Link copied to clipboard
infix fun String.to(value: Any): Localization.Entry

Create a new localization entry, this binds a key (from a templated string) to the value