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 Internationalize the player for merge order and fallback rules.

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

const t = createTranslator(getI18nTranslations('pt-BR'), 'pt-BR');
t('buttons.play', { default: 'Play' });

API Reference

Parameters

ParameterTypeDefaultDetails
locale*(typeof LOCALES)[number] | string & o...

Return Value

TypeDetails
object