# hasRegisteredLocale

Check whether an exact locale tag exists in the global i18n registry

## Import

```tsx
import { hasRegisteredLocale } from "@videojs/react/i18n";
```

`hasRegisteredLocale` returns whether a normalized locale tag has an explicit registry layer from [`registerI18n`](https://videojs.org/docs/framework/react/reference/api/register-i18n). It does **not** indicate whether a lazy built-in pack exists. Only registry entries count.

```ts
import { hasRegisteredLocale, registerI18n } from '@videojs/react/i18n';

hasRegisteredLocale('fr'); // false until registered
registerI18n('fr', { buttons: { play: 'Lecture' } });
hasRegisteredLocale('fr'); // true
```

## API Reference

`hasRegisteredLocale(locale): boolean`

### Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `locale` (required) | `(typeof LOCALES)[number] \| string & {}` | — | BCP 47 tag to test. |

### Return Value

`boolean`

---

React documentation: https://videojs.org/docs/framework/react/llms.txt
All documentation: https://videojs.org/llms.txt
