Version: 2.69.0

UIConfiguration.language

THEOplayer > UIConfiguration > language

UIConfiguration.language property

The language which is used for localization.

Signature:
language?: string | UILanguage;

Remarks


- This can be a [language map](/docs/api-reference/theoplayer-uilanguage).
- Otherwise it can be a language code which is the key to a [language map](/docs/api-reference/theoplayer-uilanguage) in [UIConfiguration.languages](/docs/api-reference/theoplayer-uiconfiguration-languages).

Example 1

Localize statically to one language.

ui: {
language: {
"Play": "Reproducir",
"Pause": "Pausa",
"Current Time": "Tiempo actual",
// [...]
}
}

Example 2

Localize dynamically to one of multiple languages.

ui: {
language: 'es',
languages: {
"es": {
"Play": "Reproducir",
"Pause": "Pausa",
"Current Time": "Tiempo actual",
// [...]
},
"fr": {
// [...]
}
}
}