Setting the Language for the Ooyala Player

Note: This sets the language for the Ooyala Web Player skin only. There are also player settings for the default language track (for video assets with multiple audio language tracks) as well as the default Closed Caption language.

You can localize the Player V4 (HTML5) and Android and iOS player skins. The default skin.json file included in the example on Github references default localization files for the player.

"localization": {
    "defaultLanguage": "en",
    "availableLanguageFile": [
      {
        "language": "en",
        "languageFile": "",
        "androidResource": "skin-config/languageFiles/en.json",
        "iosResource": "en"
      },
      {
        "language": "es",
        "languageFile": "",
        "androidResource": "skin-config/languageFiles/es.json",
        "iosResource": "es"
      },
      {
        "language": "zh",
        "languageFile": "",
        "androidResource": "skin-config/languageFiles/zh.json",
        "iosResource": "zh"
      }
            {
        "language": "ja",
        "languageFile": "",
        "androidResource": "skin-config/languageFiles/ja.json",
        "iosResource": "ja"
      }
    ]

Changing the Default Language

To change the language setting, overwrite the language value in the skin.json file to the value you want. You must then host the localized file you have created.

If the desired language file is self-hosted, reference the path location in the override.

Example (web only):

{
    "skin": {
    "inline": {
    "localization": {
    "defaultLanguage": "de",
    "availableLanguageFile": [
    {
    "language": "de",
    "languageFile": "https://example.com/de.json", // The url where the custom language file is hosted
    }
    ]
   }
  }
 }
}  

Creating a new Player Language File

To create your own language file, you can utilize an existing string file to create the localizations in. For example, this file provides the base strings (in English) and the localized strings in Spanish.

Once you have your new language file, host that file and reference it as the default language as described above.

Was this article helpful?