Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Youtube Embed Code already provides a way to autoload captions and even set default caption language. We should provide support to activate this feature.
Comments
Comment #1
GDrupal CreditAttribution: GDrupal commentedPatch provided enables captions support with the option to set current system language as default caption too.
Comment #2
helior CreditAttribution: helior commentedThis is really handy!
I'd replace using LANGUAGE_TYPE_INTERFACE and the $GLOBALS variable directly with this:
And also check against accidentally using an 'und' language.
This patch certainly does the trick though, thank you.
Comment #3
dagmarWould be nice to have one or two line of comment to explain what is doing this new code.
Comment #4
GDrupal CreditAttribution: GDrupal commentedMoving to more consistent
+ typo fix + explanatory comments.
Comment #5
dagmarYou could use LANGUAGE_NONE http://api.drupal.org/api/drupal/includes%21bootstrap.inc/constant/LANGU...
Comment #6
GDrupal CreditAttribution: GDrupal commented@dagmar Done!
Comment #7
GDrupal CreditAttribution: GDrupal commentedSorry moving to a single commit...
Comment #8
dagmarThanks!
Comment #9
iamEAP CreditAttribution: iamEAP commentedPatch looks good, tested and it works as expected. +1 on RTBC
Comment #10
helior CreditAttribution: helior commentedRe-rolling dagmar's changes while fixing some merge conflicts.
Comment #11
aaron CreditAttribution: aaron commentedCommitted to http://drupalcode.org/project/media_youtube.git/commit/3f8781b.