Hi guys, I'm running a few different versions of a single blog in different languages. To begin with, much of the content is the same across the different languages and has been professionally translated by copy teams. However, I have a few videos to include, the ones that aren't available in the other languages have just been left out for now but YouTube has an option both to translate the captions and while it is a bit of a poor substitute, it should be included.
Where I'm tripping up the though is getting the video to embed with the captions both turned on and translated, at the minute I can't get it to do either and I was hoping someone else would have come across the same issue.
Googling around says you should include '&cc_load_policy=1' at the end of the embed code to turn captions on and then 'cc_lang_pref=fr' (for French) before this to choose the language preferences.
I got it to change the language of the menu items etc. to change to French but the default option for subtitles was still 'anglais' and they were not on by default.
Anyone have any experience with this that they could help me out?
Does this help:
If you want to keep your English closed captions file as the default for the video but force your Spanish or German subtitles on your website embeds then you'll need to add something extra to the URL. For instance, to force Spanish closed captions on a video (if you have uploaded that particular language file of course), just add “&hl=es&cc_lang_pref=es” before the “&cc_load_policy=1” to the video’s embed code:
- “hl” sets the language for all features within the YouTube video.
- “cc_lang_pref” sets the language for the captions shown in the video.
So, if we had Spanish closed captions for the video below, and we wanted to force them because we were embedding them on a relevant page, we would extend the URL like so:
Looks like your just missing the "hl" variable on the URL.
Hope this helps.
Hi mate, thanks for your reply. Unfortunately that hasn't seemed to work either.
I've been practising with this video: https://www.youtube.com/watch?v=HGUjqtopjvs which if you click into it etc. does have foreign language captions available yet I can't get it to embed and play them automatically, even just in a HTML txt file let alone Lithium.
Do you think it's to do with youtube's new embed code?
Make captions automatically appear for an embedded video by adding "&cc_load_policy=1" to the video's embed code. You can also choose a caption language for the embedded video. To specify the caption language for the video that you'd like to embed, just add "&cc_lang_pref=fr&cc_load_policy=1" to the video's embed code. "cc_lang_pref" sets the language for the captions shown in the video. "cc_load_policy=1" turns captions on by default. "fr" represents the language code for French. You can look up 2-letter language codes in the ISO 639-1 standard.
Hope it helps
Welcome to the Technology board!Curious about our platform? Looking to connect on social technology? You've come to the right place!