Web Player
Localization
Localize all text inside the player
You can localize all text inside your TargetVideo player by setting up a localization object in the configuration parameters in the player's embed code.
With this object in place you can expand on basic translation capabilities of a player and add custom translations of specific words.
The player already translates its interface when the page is UTF-8 and its <html lang> is one of these languages:
Language | Code |
|---|---|
Bosnian |
|
Croatian |
|
Danish |
|
French |
|
German |
|
Hungarian |
|
Italian |
|
Montenegrin |
|
Portuguese |
|
Russian |
|
Serbian |
|
Slovenian |
|
Spanish |
|
Any key you set in translate replaces the built-in text; keys you leave out keep it. Set turnOffLocalization to true to switch the built-in translations off.
Example of a TargetVideo player with a localization object
$bp("myDiv", {"id":"PLAYER_ID","width":"640","height":"360","video":"VIDEO_ID",
"translate": {
"ima_locale": "en",
"loading_ad": "Loading ad...",
"ad": "Advertisement",
"ad_starts_soon": "Ad will start soon",
"skip_ad": "Skip Ad",
"skip_in": "Skip In",
"toggle_play": "Toggle Playback",
"prev_video": "Previous Video",
"next_video": "Next Video",
"toggle_hd": "Toggle Video Quality",
"toggle_fullscreen": "Toggle Fullscreen",
"toggle_mute": "Toggle Mute Video",
"toggle_captions": "Toggle Captions",
"play": "Play Video",
"share": "Share Video",
"playlist": "View Playlist",
"pause": "Pause Video",
"repeat": "Repeat",
"open_brand": "Open Brand URL",
"age_text": "The content in this video requires age verification, please enter your date of birth below:",
"age_confirm": "CONFIRM",
"age_not_valid": "You do not meet the minimum age requirement to view this content.",
"close": "Close",
"embed_code": "Embed Code",
"share_link": "Share Link",
"share_link_copied": "Link Copied",
"share_on": "Share On",
"read_more": "Read more!"
}
});Explanation of parameters
Parameter name | Description |
|---|---|
ima_locale | Google IMA specific setting for localizing ads pushed through Google IMA SDK |
loading_ad | Set custom text for loading an ad |
ad | Advertisement notice inside the player while a VAST ad is displaying |
ad_starts_soon | Info on when a mid roll will appear inside the player |
skip_ad | Text for the skip ad button inside the player |
skip_in | Skip in ... text when it countdowns to 0 when a user can skip an ad |
toggle_play | Mouse over hover on the player button |
prev_video | Mouse over hover on the previous video button |
next_video | Mouse over hover on the next video button |
toggle_hd | Mouse over hover on the HD toggle button |
toggle_fullscreen | Mouse over hover on the player's fullscreen button |
toggle_mute | Mouse over hover on the player's mute button |
toggle_captions | Mouse over hover on the player's closed captions button |
play | Set custom text for play video |
share | Set custom text for share video |
playlist | Set custom text for the playlist button |
pause | Set custom text for pause video |
repeat | Set custom text for replay/repeat a video |
open_brand | Set custom text for mouse over on custom logo set |
age_text | Set custom text for age gate verification |
age_confirm | Set custom text for confirm button for age gate verification |
age_not_valid | Set custom text if user does not make age verification |
close | Set custom text for close |
embed_code | Set custom text for embed code |
share_link | Set custom text for share link |
share_link_copied | Set custom text for share link copied |
share_on | Set custom text for share on |
read_more | Set custom Read more text on video carousel units CTA buttons |
ad_ends_in | Set custom text for “Ad ends in”, shown before the seconds left |
showing | First word of the ad counter in an ad pod (“Showing 1 of 3”) |
of | Middle word of the ad counter in an ad pod (“Showing 1 of 3”) |
rewind | Mouse over hover on the rewind button |
unmute | Mouse over hover on the unmute button |
toggle_sound | Mouse over hover on the sound button |
quality | Mouse over hover on the quality menu |
playback_rate | Mouse over hover on the playback speed menu |
audio_track | Mouse over hover on the audio track menu |
shortcuts | Set custom text for the keyboard shortcuts menu |
airplay | Mouse over hover on the AirPlay button (no built-in translation) |
pip | Mouse over hover on the picture-in-picture button (no built-in translation) |
like | Mouse over hover on the like button (no built-in translation) |
toggle_theater | Mouse over hover on the theater mode button (no built-in translation) |
more_videos | Set custom text for the More Videos button |
next | Set custom text for the “Next:” label in front of the next video’s title |
skip | Set custom text for the skip button on the next-video prompt |
stay | Set custom text for the stay button on the next-video prompt |
autoplay_paused | Set custom text shown when autoplay is paused |
now_playing | Set custom text for the Now playing label |
video_loading | Set custom text shown while a video is loading |
embed_code_copied | Set custom text shown after the embed code is copied |
poweredBy | Set custom text for “Powered by” |
source | Set custom text for the label in front of the video’s credits (“Source: …”) |
goto_article | Set custom text for the link to the related article |
live | Set custom text for the LIVE badge (no built-in translation) |
broadcast_ended | Set custom text shown when a live stream has not started or has ended |
livestream_starting | Set custom text shown when a live stream is about to start |
livestream_starts | Set custom text for “Livestream starts”, shown before the start time |
in | Word used in the countdown before a live stream (“starts in …”) |
today | Word used when a live stream starts today |
tomorrow | Word used when a live stream starts tomorrow |
days | Comma-separated weekday names, starting with Sunday |
livestream_ended | Set custom text shown after a live stream has ended |
Error messages — such as the ad blocker notice, “video not available in your country” or “video does not exist” — are not part of translate. The player shows them from a built-in table, in the page’s language when it is one of es, de, fr, it, ru, pt, sr, me, hr, bs or sl, and in English otherwise. They can’t be changed from the embed code.