diff --git a/site/src/content/docs/concepts/i18n.mdx b/site/src/content/docs/concepts/i18n.mdx index ae6dc408..46f1a21b 100644 --- a/site/src/content/docs/concepts/i18n.mdx +++ b/site/src/content/docs/concepts/i18n.mdx @@ -74,7 +74,7 @@ Import from `@videojs/html/i18n` or `@videojs/react/i18n` depending on your fram - ``, ``, and skins include an i18n provider mixin. - Set `` (or `lang` on an ancestor) and ship/register Spanish strings. -Use `` when you render **standalone** controls outside a player, or when one page hosts players in different languages. +Use `` when you render **standalone** controls outside a player, or when one page hosts players in different languages. @@ -93,7 +93,7 @@ Wrap with an explicit `I18nProvider``` or `locale` on `I18nProvider` +1. **Explicit**: `lang` on `` or `locale` on `I18nProvider` 2. **Ambient**: nearest ancestor `[lang]` (HTML) or `langRootRef` / `` (React) 3. **Fallback**: English defaults diff --git a/site/src/content/docs/how-to/i18n-override-translations.mdx b/site/src/content/docs/how-to/i18n-override-translations.mdx index f9fe999d..ec4fc64f 100644 --- a/site/src/content/docs/how-to/i18n-override-translations.mdx +++ b/site/src/content/docs/how-to/i18n-override-translations.mdx @@ -58,9 +58,9 @@ Nested providers inherit the parent locale when you only pass `translations`: Use `` for static copy outside buttons: ```html - + - + ``` Override the phrase in the registry or set `lang` on the provider to a locale where you patched `Play`. diff --git a/site/src/content/docs/how-to/i18n-ssr.mdx b/site/src/content/docs/how-to/i18n-ssr.mdx index 0756cb97..0ac518a7 100644 --- a/site/src/content/docs/how-to/i18n-ssr.mdx +++ b/site/src/content/docs/how-to/i18n-ssr.mdx @@ -80,7 +80,7 @@ Match your app's locale negotiation. Video.js does not replace framework i18n; i ## HTML custom elements -SSR HTML players should emit `lang` on `` or on ``. Register packs in the entry module loaded before custom elements upgrade: +SSR HTML players should emit `lang` on `` or on ``. Register packs in the entry module loaded before custom elements upgrade: ```ts import '@videojs/html/video'; diff --git a/site/src/content/docs/how-to/i18n-switch-locale.mdx b/site/src/content/docs/how-to/i18n-switch-locale.mdx index 8a51a1c9..1e88cd92 100644 --- a/site/src/content/docs/how-to/i18n-switch-locale.mdx +++ b/site/src/content/docs/how-to/i18n-switch-locale.mdx @@ -22,7 +22,7 @@ document.documentElement.lang = 'fr'; ``` @@ -73,9 +73,9 @@ Changing `locale` triggers lazy `loadLocale` for built-in packs. ```html - + ... - + - + - + ``` ## Attributes diff --git a/site/src/content/docs/reference/media-text.mdx b/site/src/content/docs/reference/media-text.mdx index dd7f64ff..bd7cf1d4 100644 --- a/site/src/content/docs/reference/media-text.mdx +++ b/site/src/content/docs/reference/media-text.mdx @@ -8,12 +8,12 @@ import FrameworkCase from "@/components/docs/FrameworkCase.astro"; -`` renders the translated value for a registry phrase inside a `` (or any ancestor with the i18n provider mixin). Use it for standalone labels, tooltips, or demos — skin controls resolve phrases internally. +`` renders the translated value for a registry phrase inside a `` (or any ancestor with the i18n provider mixin). Use it for standalone labels, tooltips, or demos — skin controls resolve phrases internally. ```html - + - + ``` ## Attributes diff --git a/site/src/docs.config.ts b/site/src/docs.config.ts index 7343d296..ae031f44 100644 --- a/site/src/docs.config.ts +++ b/site/src/docs.config.ts @@ -148,7 +148,7 @@ export const sidebar: Sidebar = [ frameworks: ['html'], contents: [ { slug: 'reference/html-create-player', sidebarLabel: 'createPlayer' }, - { slug: 'reference/media-i18n-provider', sidebarLabel: 'media-i18n-provider' }, + { slug: 'reference/media-i18n', sidebarLabel: 'media-i18n' }, { slug: 'reference/media-text', sidebarLabel: 'media-text' }, { slug: 'reference/player-controller' }, {