Skip to content
FrameworkStyle

registerI18n

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

registerI18n merges a partial translation map into the process-wide registry for a locale tag. English defaults are registered by the i18n bundle. 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 the current English phrases (Play, Pause). See Translation phrases and Translations.

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

registerI18n('es', {
  Play: 'Reproducir',
  Pause: 'Pausar',
});

API Reference

Parameters

Parameter Type Default Details
locale* string & object | 'hr' | 'th' | 'tr' ...
translations* Partial<Translations>

Return Value

void