> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# I18nConfig

> Interface exported by @botmesh/core.

Defined in: [i18n/types.ts:85](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L85)

i18n options — `BotConfig.i18n` or `bot.locale({ ... })`.

## Extended by

* [`I18nOptions`](https://botmesh.afaya.com.co/api/core/spi/interfaces/I18nOptions)

## Properties

### defaultLocale?

```ts theme={null}
defaultLocale?: string;
```

Defined in: [i18n/types.ts:87](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L87)

Language used when nothing else resolves, and the fallback for missing keys. Default `'en'` (or `BotConfig.lang`).

***

### detect?

```ts theme={null}
detect?: LanguageDetector;
```

Defined in: [i18n/types.ts:89](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L89)

Custom detector (see [LanguageDetector](https://botmesh.afaya.com.co/api/core/type-aliases/LanguageDetector.md)).

***

### providerLanguage?

```ts theme={null}
providerLanguage?: boolean;
```

Defined in: [i18n/types.ts:95](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L95)

Use the language the provider reports for the sender (`SenderInfo.language`,
or `platformData.languageCode` / `language` / `locale`, e.g. Telegram's
`language_code`). Default `true`.

***

### userKey?

```ts theme={null}
userKey?: string;
```

Defined in: [i18n/types.ts:97](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L97)

`ctx.user` key holding the user's preference (read on every message, written by `ctx.setLang`). Default `'lang'`.

***

### locales?

```ts theme={null}
locales?: readonly string[];
```

Defined in: [i18n/types.ts:106](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/types.ts#L106)

Allow-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).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.