> ## 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.

# ContextI18n

> Interface exported by @botmesh/core.

Defined in: [core/provider.ts:1261](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1261)

What `buildMessageContext` needs to localize a context (implemented by the Bot's `I18n`).

## Properties

### defaultLocale

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

Defined in: [core/provider.ts:1263](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1263)

Initial `ctx.lang` (the bot re-resolves it inside the per-chat queue).

***

### userKey

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

Defined in: [core/provider.ts:1265](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1265)

`ctx.user` key `ctx.setLang()` writes.

***

### enabled

```ts theme={null}
readonly enabled: boolean;
```

Defined in: [core/provider.ts:1267](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1267)

Whether per-message language resolution is on; `ctx.setLang()` refuses otherwise.

## Methods

### supported()

```ts theme={null}
supported(code): string | undefined;
```

Defined in: [core/provider.ts:1269](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1269)

The registered locale serving `code` (itself or its base language), else `undefined`.

#### Parameters

| Parameter | Type |
| - | - |
| `code` | `unknown` |

#### Returns

`string` | `undefined`

***

### translate()

```ts theme={null}
translate(
   lang, 
   key, 
   params?
): string;
```

Defined in: [core/provider.ts:1270](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/provider.ts#L1270)

#### Parameters

| Parameter | Type |
| - | - |
| `lang` | `string` \| `undefined` |
| `key` | `string` |
| `params?` | [`TranslateParams`](https://botmesh.afaya.com.co/api/core/type-aliases/TranslateParams) |

#### Returns

`string`


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