# onI18nRegistryChange

Subscribe to global i18n registry mutations

## Import

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

`onI18nRegistryChange` registers a callback that runs whenever any locale layer changes, for example after `registerI18n` or browser translation prefetch. Returns an unsubscribe function.

React `I18nProvider` uses this to invalidate translators when the registry updates.

## API Reference

`onI18nRegistryChange(callback): (() => void)`

### Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `callback` (required) | `(() => void)` | — | Invoked when any locale layer changes. |

### Return Value

| Type |
| --- |
| `(() => void)` |

---

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