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

# LanguageDetector

> Type alias exported by @botmesh/core.

```ts theme={null}
type LanguageDetector = (ctx) => 
  | string
  | null
  | undefined
| Promise<string | null | undefined>;
```

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

Custom language detector — step 3 of the resolution order (after the
`ctx.user` preference and the provider-reported language). Return a locale
code, or nothing to fall through to the default. Errors are logged (debug)
and treated as "no answer". A code with no registered locale is ignored.

## Parameters

| Parameter | Type |
| - | - |
| `ctx` | [`MessageContext`](https://botmesh.afaya.com.co/api/core/interfaces/MessageContext) |

## Returns

\| `string`
\| `null`
\| `undefined`
\| `Promise`\<`string` | `null` | `undefined`>


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