localizeOrNull

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

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

Parameters

locale

The DiscordLocale to use when fetching the localization bundle

localizationPath

The path of the localization template, prefixed with localizationPrefix

entries

The entries to fill the template with


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

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

Parameters

localizationPath

The path of the localization template, prefixed with localizationPrefix

entries

The entries to fill the template with