Create, edit, apply languages for Videojs and 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.
Video.js distribution package includes "lang" directory with multiple .json files, each representing certain language translation. For much easier use Nuevodevel also prepared appropriate javascript files with language translations and this makes very easy to load and apply custom language to player, just likr Spanish (es.js) in example below.
Code snippet
<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> <script> var player = videojs('example_video_1',{language: 'es'}); player.nuevo({ //plugin options here }); </script>
- Download language .js file and open it in editor which fully support UTF-8 character, eg. free PSPad.
- In any line between other translation lines enter original quoted text string and after colon your quoted translation string.
- If this is not last translation line, remember to put comma in the end of the line.
- Save updated file and upload back to server.