OptionalloggerOptionaldefaultLanguage used when nothing else resolves, and the fallback for missing keys. Default 'en' (or BotConfig.lang).
OptionaldetectCustom detector (see LanguageDetector).
OptionalproviderUse the language the provider reports for the sender (SenderInfo.language,
or platformData.languageCode / language / locale, e.g. Telegram's
language_code). Default true.
Optionaluserctx.user key holding the user's preference (read on every message, written by ctx.setLang). Default 'lang'.
OptionallocalesAllow-list of the languages the bot serves (e.g. ['en'] for a bot whose
content — persona, flows, button titles — is only in English). A stored
preference, provider-reported or detected language outside it is ignored, so
resolution falls back to defaultLocale (always served); ctx.setLang()
refuses it. Regional variants follow their base ('en' serves 'en-GB').
Default: every registered locale (the built-in es and en included).
Options of the I18n constructor.