Change embedded YouTube URL based on language in php
-
Hi all, on my site https://www.cook4app.com I embedded directly a YouTube video in the home page. This is located at https://www.cook4app.com/#appvideo or anyway by scrolling down from the home page.
I did so by entering the following in index.php
<div id=”appvideo”>
<?php echo do_shortcode(‘[iframe class=”app-video” src=”https://www.youtube.com/embed/z-AXekVimzU?rel=0&showinfo=0″ frameborder=”0″ width=”100%”]’);
?>Now I’d like to have the video URL change based on the home page language, which is in turn dependent, thanks to qTranslate, on the browser language.
Would you kindly help me understand how I can enable qTranslate directly on the php in this case?
Thank you.
Cheers,
Manley
- The topic ‘Change embedded YouTube URL based on language in php’ is closed to new replies.