Deep-merge messages into locale code. Throws TypeError on an invalid code or tree.
Set the default locale WITHOUT turning on language resolution (BotConfig.lang):
the built-in texts and ctx.lang use code, and no ctx.user read, provider
language or detector is consulted. Throws TypeError on an empty code.
Registered locale codes (built-ins included).
The registered locale serving code: itself, else its base language
('es-AR' → 'es'). undefined when neither is registered, or when the
locales allow-list leaves it out (the default locale is always served).
Translate key for lang (see the class docs for the fallback chain).
Never throws: a key missing everywhere comes back as the key itself.
Optionalparams: TranslateParamsResolve the language of an inbound context: the ctx.user preference →
the provider-reported language → the detector's answer → the default. Each
candidate only counts when a registered locale serves it (supported),
so the result is always a registered locale or the default. Never rejects. Returns the default
immediately while i18n is not enabled.
resolve plus where the language came from (see LangSource). Never rejects.
Forget the provider-reported language remembered for sender (subject erasure,
bot.deleteSubject()). Returns whether one was remembered.
The default locale (normalized).
ctx.user key holding the language preference.
True once locales were registered or options configured — language resolution is active.
Whether a custom detector is configured (its answer may depend on ctx.body).
Apply i18n options (marks the registry as enabled). Throws
TypeErroron invalid values.