Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Auto-translate embedded videos?

Quite simple.

If I use this code: https://www.youtube.com/embed/d0yGdNEWdn0?&hl=en&cc_lang_pref=en&cc_load_policy=1

With:

hl=en and cc_lang_pref=en to choose english AND cc_load_policy=1 to activate subs

It will work fine and show my subs in english.

The problem is, if I use portuguese: https://www.youtube.com/embed/d0yGdNEWdn0?&hl=pt&cc_lang_pref=pt&cc_load_policy=1

It will not work because there is no portuguese subtitles. However, you can use auto-translate and then have the portuguese subs as I wish.

The question is: how can I create a link that automatically activates the english>>portuguese translation? I have been look for it and didn't find an answer.

Thank you in advance!

like image 477
Will Avatar asked Mar 30 '16 23:03

Will


1 Answers

recently had the same question, but there is no clear answer for this.

TL;DR: Just upload your PT translated subtitles with the same code in it.

Your code for pt is correct. It's YouTube that not utilize your URL.

According to YT own logic - they give auto-translated subtitles full control only to a user (via clicking). And there are no ways to override it from the developer side (2019-04).

Same time you can add own subtitles on Portuguese. Even if they are translated from original English via Google Translate. And your code will start to work.

The Replies that gave me that info: https://support.google.com/youtube/forum/AAAAiuErobUTdcd8GOxOLE/?hl=en&gpf=%23!msg%2Fyoutube%2FTdcd8GOxOLE%2F9iVrU-qOc5YJ&msgid=9iVrU-qOc5YJ

like image 135
PIoneer_2 Avatar answered Sep 20 '22 08:09

PIoneer_2