digitalutsc / ableplayer

Extending Drupal's AblePlayer integration to provide simultaneous transcript player.
GNU General Public License v3.0
0 stars 0 forks source link

Multilingual interface AblePlayer #2

Open kstapelfeldt opened 2 years ago

kstapelfeldt commented 2 years ago

How to pick up the language context and show a different language

larkgz commented 2 years ago

Able Player supports automatic localization of its UI according to site language. In other words, if you open Able Player while the site is in another language, Able Player will automatically be translated if the language is supported.

To add new languages, you can add new .js files to ./translations and add the corresponding language code to the array of supported languages: https://github.com/digitalutsc/ableplayer/blob/ae2853c3977acc7413b213a6ea6771ac1832b388/js/ableplayer.min.js#L7900

For multiple language transcript options, the Able Player Drupal module supports this with its 3.x development branch (still in alpha). However, this requires reuploading caption files to work with their new translations system because the language of the transcripts is not stored anywhere with the current system.