Video.js + Nuevo plugin languages

DOCUMENTATION

Create, edit, apply languages for Video.js player including Nuevo plugin Video.js framework supports multiple languages and allows for users of non-English locales to natively interact with the player.
Player example above with preroll video use Spanish language.

Additional language support can be added to Video.js in multiple ways. Language support is described in detail on dedictaed website http://docs.videojs.com/docs/guides/languages.html.

Here we will focus on subject how to include new texts that come along with Nuevo plugin and on possibly the easiest method to apply new language.

Video.js package includes "lang" directory with multiple javascript files, each representing certain language translation. The easiest way to support Nuevo plugin texts is to add translation strings to one or more of language javascript files. See below default English language json with new strings to tranlslate from Nuevo plugin.

{
  "Audio Player": "Audio Player",
  "Video Player": "Video Player",
  "Play": "Play",
  "Pause": "Pause",
  "Replay": "Replay",
  "Current Time": "Current Time",
  "Duration Time": "Duration Time",
  "Remaining Time": "Remaining Time",
  "Stream Type": "Stream Type",
  "LIVE": "LIVE",
  "Loaded": "Loaded",
  "Progress": "Progress",
  "Progress Bar": "Progress Bar",
  "progress bar timing: currentTime={1} duration={2}": "{1} of {2}",
  "Fullscreen": "Fullscreen",
  "Non-Fullscreen": "Non-Fullscreen",
  "Mute": "Mute",
  "Unmute": "Unmute",
  "Playback Rate": "Playback Rate",
  "Subtitles": "Subtitles",
  "subtitles off": "subtitles off",
  "Captions": "Captions",
  "captions off": "captions off",
  "Chapters": "Chapters",
  "Descriptions": "Descriptions",
  "descriptions off": "descriptions off",
  "Audio Track": "Audio Track",
  "Volume Level": "Volume Level",
  "You aborted the media playback": "You aborted the media playback",
  "A network error caused the media download to fail part-way.": "A network error caused the media download to fail part-way.",
  "The media could not be loaded, either because the server or network failed or because the format is not supported.": "The media could not be loaded, either because the server or network failed or because the format is not supported.",
  "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",
  "No compatible source was found for this media.": "No compatible source was found for this media.",
  "The media is encrypted and we do not have the keys to decrypt it.": "The media is encrypted and we do not have the keys to decrypt it.",
  "Play Video": "Play Video",
  "Close": "Close",
  "Close Modal Dialog": "Close Modal Dialog",
  "Modal Window": "Modal Window",
  "This is a modal window": "This is a modal window",
  "This modal can be closed by pressing the Escape key or activating the close button.": "This modal can be closed by pressing the Escape key or activating the close button.",
  ", opens captions settings dialog": ", opens captions settings dialog",
  ", opens subtitles settings dialog": ", opens subtitles settings dialog",
  ", opens descriptions settings dialog": ", opens descriptions settings dialog",
  ", selected": ", selected",
  "captions settings": "captions settings",
  "subtitles settings": "subititles settings",
  "descriptions settings": "descriptions settings",
  "Text": "Text",
  "White": "White",
  "Black": "Black",
  "Red": "Red",
  "Green": "Green",
  "Blue": "Blue",
  "Yellow": "Yellow",
  "Magenta": "Magenta",
  "Cyan": "Cyan",
  "Background": "Background",
  "Window": "Window",
  "Transparent": "Transparent",
  "Semi-Transparent": "Semi-Transparent",
  "Opaque": "Opaque",
  "Font Size": "Font Size",
  "Text Edge Style": "Text Edge Style",
  "None": "None",
  "Raised": "Raised",
  "Depressed": "Depressed",
  "Uniform": "Uniform",
  "Dropshadow": "Dropshadow",
  "Font Family": "Font Family",
  "Proportional Sans-Serif": "Proportional Sans-Serif",
  "Monospace Sans-Serif": "Monospace Sans-Serif",
  "Proportional Serif": "Proportional Serif",
  "Monospace Serif": "Monospace Serif",
  "Casual": "Casual",
  "Script": "Script",
  "Small Caps": "Small Caps",
  "Reset": "Reset",
  "restore all settings to the default values": "restore all settings to the default values",
  "Done": "Done",
  "Caption Settings Dialog": "Caption Settings Dialog",
  "Beginning of dialog window. Escape will cancel and close the window.": "Beginning of dialog window. Escape will cancel and close the window.",
  "End of dialog window.": "End of dialog window.",

	// Nuevo plugin strings

 "Quality": "Wuality",
 "Settings": "Settings",
 "Related": "Related",
 "Share": "Share",
 "Speed": "Speed",
 "Zoom:": "Zoom",
 "Link": "Link",
 "Embed": "Embed",
 "Social": "Social",
 "Check out this cool video on": "Check out this cool video on",
 "ZOOM RESET": "ZOOM RESET",
 "Keyboard control": "Keyboard control",
 "zoom area": "zoom area",
 "scroll left": "scroll left",
 "scroll right": "scroll right",
 "scroll down": "scroll down",
 "scroll up": "scroll up",
 "ZOOM": "ZOOM",
 "Use +/- key and arrow keys to scroll zoomed area": "Use +/- key and arrow keys to scroll zoomed area",
 "Mirror view": "Mirror view",
 "Advertisement": "Advertisement",
 "Skip Ad in": "Skip Ad in",
 "seconds": "seconds",
 "Skip Now!": "Skip Now!",
 "Watch full video on": "Watch full video on" 
};

For any other language files enough is to add Nuevo plugin srings and translate each part of line after colon.
It is important to edit javascript file using text editor which supports UTF-8 before you upload file to server. Example free editor is PSPad.
For Nuevo plugin license holders we deliver video.js package which already includes language javascript files with Nuevo strings added. All you need to do is to translate part of lines after colon.

Once you have ready translation and javascript language file uploaded to server you can determining player language. The easiest way is to load certain javascript language file right after video.js file loaded, like Spanish "es.js" loaded in example code below.
<script src="//domain.com/video-js/video.min.js"></script>
<script src="//domain.com/video-js/lang/es.js"></script>
<script src="//domain.com/video-js/nuevo.min.js"></script>
Final step is to enable certain language via the language videojs option:

<script>
var player = videojs('example_video_1',{language: 'es'},function(){ 
	this.nuevoPlugin({
		logo: '//domain.com/path/to/logo.png',
		logoposition: 'RT',
		logourl: '//domain.com',
	});
});
</script>

For Nuevolab clients who purchase nuevo plugin we deliver all available language javascript files and new text strings already included in each of file. You only need to translate English strings into desired language.