# useLocale (@salmonui/core/locale)

> The useLocale function of @salmonui/core/locale: The locale of the nearest LocaleProvider, or undefined outside one.

Canonical: https://salmonui.dev/docs/reference/core/locale/useLocale

```ts
import { useLocale } from '@salmonui/core/locale';
```

Entry index: https://salmonui.dev/docs/reference/core/locale (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/core/locale.md).

## Reference

Kind: function

```ts
function useLocale(): string | undefined;
```

The `locale` of the nearest `LocaleProvider`, or undefined outside one.
