Referencei18n
media-text
HTML custom element that renders a translated string by semantic key
Import
One import registers both <media-i18n> and <media-text>.
<media-text> renders a translated value inside a <media-i18n> (or any ancestor with the i18n provider mixin). Set token to the semantic translation key and use the text content as its English fallback. Use it for authored component content, standalone labels, tooltips, or demos.
Token and fallback
The token attribute accepts an opaque key such as buttons.play. The initial text content is the fallback shown when the active locale has no value for that key. See Translation phrases for the supported keys and English defaults.
Without token, <media-text> keeps its text content unchanged. This is useful for literal copy that should not be translated.
Parametric translations are not yet supported on <media-text>. Use createTranslator in script for interpolated strings.