Skip to content
Interfaceplugin-i18nv0.1.0

I18nOptions

The options I18n takes.

interface I18nOptions

base

The locale whose file lists every message and the variables each one takes. Defaults to en-US.

readonly base?: LocaleCode

path

The folder that holds one .ftl file per locale, and one .ts file per locale for command translations. Defaults to ./locales.

readonly path?: string

resolveLocale

Picks the locale for an interaction or event, like a language that the user picked in your bot. When it returns undefined or null, the plugin uses the user's Discord language, then the guild's, then base.

readonly resolveLocale?: (origin: DispatchOrigin) => Promisable<LocaleCode | null | undefined>