localize Or Null
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
localization Path
The path of the localization template, prefixed with localizationPrefix unless starting with /
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
localization Path
The path of the localization template, prefixed with localizationPrefix unless starting with /
entries
The entries to fill the template with