Customize player text (Web Player)
Add player text to improve word choice or address unsupported languages.
By default, the web player uses automated player localization. This feature creates a seamless and immersive viewer experience by automatically translating all player tooltips, error messages, headings, and ARIA labels into the same language as your page content.
Publishers typically customize the player text due to one of the reasons in the table.
Reason | Description |
---|---|
Word choice | The chosen default word does not align with your brand or market |
UnsupportedΒ language | A language is not currently supported language |
To address either of the reasons in the table above, you can create an internationalization (intl
) object. You can customize translations of specific words in the following categories:
- General player elements 8.6.0+
- Advertising 8.6.0+
- Captions styling menu 8.12.3+
- Error messages 8.6.0+
- Keyboard shortcuts 8.11.0+
- Playlist overlay 8.6.0+
- Sharing 8.6.0+
Customize text
To customize a translation in any given language, use the following steps.
- Create an
intl
object. - Within the
intl
object, create an object that uses the appropriate two-letter (ISO 639-1) or locale-specific (ISO 639-1 language-country combination) language code. The language code of the object should correspond to the language defined in HTML lang attribute of the page. - Customize the translation by defining the value of the property.
The following example shows custom translations in multiple languages for different player elements.
jwplayer("myElement").setup({
...
"intl": {
// Quebec french sub-block
"fr-ca": {
"play": "Reproduire"
},
// french sub-block
"fr": {
"replay": "Repeter",
"play": "Jouer"
},
// spanish sub-block
"es": {
"replay": "Repetir"
},
// frisian sub-block
"fy": {
"advertising": {
"loadingAd": "Advertinsje lade"
}
}
}
});
Updated 12 months ago