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

# normalizeLocale()

> Function exported by @botmesh/core/spi.

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

Defined in: [i18n/I18n.ts:73](https://github.com/andresayac/botmesh/blob/main/packages/core/src/i18n/I18n.ts#L73)

Normalize a locale code: trimmed, lower-case, `_` → `-` (`' EN_us '` → `'en-us'`).
Returns `undefined` for anything that is not a non-empty string.

## Parameters

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

## Returns

`string` | `undefined`


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