Documentation

Automated Player Localization

Introduction

Radiant Media Player is equipped with various labels acting as helpers to better understand the player UI. Player labels are available in 26 languages. The player will automatically detect which is the preferred language for the viewer and display player labels in that language. Currently supported languages are:

  • Arabic
  • Chinese (simplified)
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Hebrew
  • Hindi (Devanagari script)
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Norwegian
  • Polish
  • Portuguese
  • Brazilian Portuguese
  • Russian
  • Spanish
  • Swedish
  • Taiwanese Mandarin
  • Thai
  • Turkish
  • Vietnamese

Feedback welcome! if you spot an area of improvement for a player label in your native language or if you want to help in adding new languages to our player please contact us.

Player settings

labels: Object

When detectViewerLanguage is set to false you can pass to the player a custom list of labels, to support other languages for example. This is done by passing an Object of labels to the player through the labels setting. Default: {}.

fixedLabelsLanguage: String

When fixedLabelsLanguage is set to a specific language (like 'english' or 'dutch') player labels translation will be disabled and forced to the specific language. Default: ''.

Passing custom labels

Below is a list of all player labels. When passing custom labels to the player through the labels setting, you can fill custom text for the wanted slots for all or some languages. Unfilled slots will automatically be filled by the player.

The languages

{
  english: {
   bitrates: {
     auto: 'Auto',
     renditions: [
       ['Low quality', 'High quality'],
       ['Low quality', 'Medium quality', 'High quality'],
       ['Low quality', 'Medium quality', 'High quality', 'Maximum quality'],
       ['Low quality', 'Medium quality', 'High quality', 'Higher quality', 'Maximum quality']
     ]
   },
   hint: {
     play: 'Play',
     pause: 'Pause',
     seek: 'Seek Bar',
     enterFullscreen: 'Full screen',
     exitFullscreen: 'Exit full screen',
     quickRewind: 'Rewind',
     quickForward: 'Forward',
     fastRewind: 'Fast Rewind',
     fastForward: 'Fast Forward',
     sharing: 'Share',
     sharingLink: 'Link to video',
     sharingEmbedCode: 'Embed video',
     quality: 'Quality',
     volume: 'Volume',
     mute: 'Mute',
     unmute: 'Unmute',
     minus: 'Minus',
     plus: 'Plus',
     speed: 'Speed',
     captions: 'Captions',
     track: 'Track',
     transcript: 'Transcript',
     audio: 'Audio languages',
     chapters: 'Chapters',
     live: 'LIVE',
     pip: 'PiP',
     close: 'Close',
     settings: 'Settings',
     back: 'Back',
     cast: 'Google Cast',
     airplay: 'AirPlay',
     playlist: 'Playlist',
     next: 'Next',
     previous: 'Previous',
     related: 'Related',
     upNext: 'Up Next',
     up: 'Up',
     down: 'Down',
     left: 'Left',
     right: 'Right',
     default: 'Default',
     vr: 'VR',
     off: 'Off',
     loop: 'Loop',
     info: 'Information',
     threeSixty: '360°'
   },
   fccCaptions: {
     fontColor: 'Font Color',
     fontOpacity: 'Font Opacity',
     fontSize: 'Font Size',
     fontFamily: 'Font Family',
     fontEdge: 'Font Edge',
     backgroundColor: 'Background Color',
     backgroundOpacity: 'Background Opacity',
     windowColor: 'Window Color',
     windowOpacity: 'Window Opacity'
   },
   error: {
     customErrorMessage: 'This content is currently unavailable.',
     noSupportMessage: 'This content cannot be played on this device.',
     noSupportDownload: 'You may download video by clicking on that link',
     noSupportInstallChrome: 'Using the latest version of Google Chrome may help to view this content.',
     noSupportInstallChromeLink: 'https://www.google.com/chrome/'
   },
   ads: {
     controlBarCustomMessage: 'Ad',
     skipMessage: 'Skip ad',
     textForClickUIOnMobile: 'Learn more',
     adBlockerDetectedMessage: 'Ad-blocker detected. To view this content please disable your ad-blocker.'
   }
  }
}

Here are the available language names: arabic, chinese, danish, finnish, dutch, english, french, german, hebrew, hindi, hungarian, indonesian, italian, japanese, korean, norwegian, polish, portuguese, portugueseBrazilian, russian, spanish, swedish, taiwanese, thai, turkish, vietnamese.

Player code example for passing custom labels:

<script src="https://cdn.radiantmediatechs.com/rmp/7.9.1/js/rmp.min.js"></script>
<!-- Player container element -->
<div id="rmp"></div>
<script>
const src = {
  mp4: [
    'https://your-mp4-sd-url.mp4',
    'https://your-mp4-hd-url.mp4'
  ]
};
// Define player labels
const labels = {
  english: {
    hint: {
      play: 'Custom Text',
      pause: 'Custom Text'
    }
  },
  spanish: {
    hint: {
      play: 'Texto personalizado',
      pause: 'Texto personalizado'
    }
  }
};
// Player settings
const settings = {
  src: src,
  licenseKey: 'your-license-key',
  width: 640,
  height: 360,
  speed: true,
  sharing: true,
  labels: labels,
  contentMetadata: {
    poster: [
      'https://your-poster-url.jpg'
    ]
  }
};
const rmp = new RadiantMP('rmp');
rmp.init(settings);
</script>

Hiding player labels

If you do not want player labels to be shown within the player you can hide them with the hideExternalPlayerLabels player setting set to true. This setting must be Boolean either true or false. false is the default.

Support notes

The bitrates.renditions label only applies for MP4 and WebM progressive download. For HLS or DASH renditions information (height and bitrate) are automatically displayed instead. You can tune the bitrates.auto label for HLS or DASH.

Labels are set using the JavaScript textContent property. Take this into account when using special characters.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2022 Radiant Media Player. All Rights Reserved.