Skip to content
FrameworkStyle

getI18nTranslations

Read the merged translation map for a locale using BCP 47 parent-chain fallback

getI18nTranslations walks the BCP 47 lookup chain (es-MXesen) and merges registry layers into one map. Providers combine this map with lazy-loaded built-in packs and provider overrides. Call it directly when building custom UI outside built-in controls.

See Internationalization for merge order and fallback rules.

import { createTranslator, getI18nTranslations } from '@videojs/html/i18n';

const t = createTranslator(getI18nTranslations('pt-BR'), 'pt-BR');
t('Play');

API Reference

Parameters

Parameter Type Default Details
locale* string & object | 'hr' | 'th' | 'tr' ...

Return Value

Translations