I18n
Type Parameters
C
Constructors
ts
I18n(config: Partial<I18nConfig<C>>);Properties
fluent
ts
readonly fluent: Fluent;locales
ts
readonly locales: Array<string>;Methods
loadLocalesDir
ts
loadLocalesDir();
Loads locales from the specified directory and registers them in the Fluent instance.
loadLocalesDirSync
ts
loadLocalesDirSync();
Loads locales from any existing nested file or folder within the specified directory and registers them in the Fluent instance.
loadLocale
ts
loadLocale();
Registers a locale in the Fluent instance based on the provided options.
loadLocaleSync
ts
loadLocaleSync();
Synchronously registers a locale in the Fluent instance based on the provided options.
t
ts
t();
Gets a message by its key from the specified locale. Alias of translate.
translate
ts
translate();
Gets a message by its key from the specified locale.
middleware
ts
middleware();
Returns a middleware to .use on the Bot instance.