# registerI18n

Register or merge translation strings for a BCP 47 locale tag in the global i18n registry

## Import

```ts
import { registerI18n } from "@videojs/html/i18n";
```

`registerI18n` merges a partial translation map into the process-wide registry for a locale tag. Components carry their own English fallback text. Built-in non-English packs lazy-load automatically; call `registerI18n` for custom locales, CDN locale modules, or patched shipped packs before the provider renders.

Keys are nested semantic names such as `buttons.play` and `buttons.pause`. See [Translation phrases](https://videojs.org/docs/framework/html/reference/api/translation-phrases) for the complete catalog.

```ts
import { registerI18n } from '@videojs/html/i18n';

registerI18n('es', {
  buttons: {
    play: 'Reproducir',
    pause: 'Pausar',
  },
});
```

## API Reference

`registerI18n(locale, translations): void`

### Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `locale` (required) | `(typeof LOCALES)[number] \| string & {}` | — | BCP 47 tag (normalized to lowercase; unicode extensions stripped for the registry key). |
| `translations` (required) | `Partial<Translations>` | — | Partial nested locale values; merges with any existing layer for the tag. |

### Return Value

`void`

---

HTML documentation: https://videojs.org/docs/framework/html/llms.txt
All documentation: https://videojs.org/llms.txt
