Package-level declarations

Types

Link copied to clipboard

Interface helping in localizing content, supports preset localization bundles, localization prefixes, and context-aware localization.

Link copied to clipboard

Interface helping in localizing content, supports preset localization bundles, localization prefixes, and context-aware localization.

Link copied to clipboard
typealias PairEntry = Pair<String, Any>
Link copied to clipboard

Interface helping in localizing content, supports preset localization bundles, localization prefixes, and context-aware localization.

Functions

Link copied to clipboard
fun Message.editLocalized(context: LocalizationContext, localizationPath: String, vararg entries: PairEntry): MessageEditAction

Edits the text content of the message with a localized message.

Edits the text content of the original message with a localized message.

Link copied to clipboard
fun LocalizationContext.localize(localizationPath: String, vararg entries: PairEntry): String

Localizes the provided path, with the best locale available.

fun LocalizationContext.localize(locale: DiscordLocale, localizationPath: String, vararg entries: PairEntry): String

Localizes the provided path, with the provided locale.

Link copied to clipboard
fun TextLocalizationContext.localizeGuild(localizationPath: String, vararg entries: PairEntry): String

Localizes the provided path, with the guild's locale.

Link copied to clipboard
fun TextLocalizationContext.localizeGuildOrNull(localizationPath: String, vararg entries: PairEntry): String?

Localizes the provided path, with the guild's locale, or returns null if the path does not exist.

Link copied to clipboard
fun LocalizationContext.localizeOrNull(localizationPath: String, vararg entries: PairEntry): String?

Localizes the provided path, with the best locale available, or returns null if the path does not exist.

fun LocalizationContext.localizeOrNull(locale: DiscordLocale, localizationPath: String, vararg entries: PairEntry): String?

Localizes the provided path, with the provided locale, or returns null if the path does not exist.

Link copied to clipboard
fun AppLocalizationContext.localizeUser(localizationPath: String, vararg entries: PairEntry): String

Localizes the provided path, with the user's locale.

Link copied to clipboard
fun AppLocalizationContext.localizeUserOrNull(localizationPath: String, vararg entries: PairEntry): String?

Localizes the provided path, with the user's locale, or returns null if the path does not exist.

Link copied to clipboard
fun Message.replaceLocalized(context: LocalizationContext, localizationPath: String, vararg entries: PairEntry): MessageEditAction

Replaces the entire message with a localized message.

Replaces the entire original message with a localized message.

Link copied to clipboard
fun BaseCommandEvent.replyLocalized(context: LocalizationContext, localizationPath: String, vararg entries: PairEntry): MessageCreateAction

Replies a localized message to the user's command.

fun IReplyCallback.replyLocalized(context: LocalizationContext, localizationPath: String, vararg entries: PairEntry): ReplyCallbackAction

Replies a localized message to this interaction and acknowledges it.

Link copied to clipboard

Replies a localized ephemeral message to this interaction and acknowledges it.

Link copied to clipboard

Sends a localized message to the event's channel.

Link copied to clipboard
fun MessageChannel.sendLocalized(context: LocalizationContext, localizationPath: String, vararg entries: PairEntry): MessageCreateAction

Sends a localized message to this channel.

Sends a localized followup message to this interaction hook.

Link copied to clipboard

Sends a localized ephemeral followup message to this interaction hook.