Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #912570

    Hello!

    When adding the VIDEO Media Element, I can add a facebook video URL. This is a link to the Facebook video page, not to a direct mp4. The Video media element does a GREAT job of only showing the video (awesome!) but it seems all of the overlays are in Spanish. This seems to happen regardless of browser and regardless if I’m logged into ANY facebook account on that machine.

    Is there a way to change this? Thanks!!

    #912659

    Hey jamesrapage,

    I’m pretty sure that is coming from/is set by facebook, maybe the user or account who owns the video is using the spanish language?

    Best regards,
    Rikard

    #912663

    Thanks!

    No, I can assure you, the users who view the link are English speaking. I can replicate it on multiple browsers, whether I’m logged into Facebook within that browser or not. Did you follow the link I posted?

    #913154

    Hi,

    Thank you for the update. Not sure why the locale parameter is set to es. Please try this script in the functions.php file.

    add_action('wp_footer', 'ava_iframe_parameters');
    function ava_iframe_parameters(){
    ?>
    <script>
    (function($){
    	$(window).load(function() {
    		// -------------------------------------------------------------------------------------------
    		// facebook.com parameter
    		// -------------------------------------------------------------------------------------------
    		function avia_iframe_parameters(container)
    		{
    			var iframe 	= jQuery('iframe[src*="facebook.com"]', container);
    
    				iframe.each(function()
    				{
    					var current = jQuery(this),
    						src = current.attr('src');
    
    					if(src)
    					{
    						if(src.indexOf('?') !== -1)
    						{
    							src = src.replace(/\locale=es_LA/g, 'locale=en_US');
    						}
    
    						current.attr('src', src);
    					}
    				});
    		}
    
    		avia_iframe_parameters('body');
    	});
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #913354

    Thanks Ismael!

    I’ve added these to the child theme in the functions.php file. I’m not seeing any change. Here is a complete copy of my child theme functions.php file, as there some additional code already added:

    <?php
    
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths){
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }
    
    add_action('wp_footer', 'ava_iframe_parameters');
    function ava_iframe_parameters(){
    ?>
    <script>
    (function($){
    	$(window).load(function() {
    		// -------------------------------------------------------------------------------------------
    		// facebook.com parameter
    		// -------------------------------------------------------------------------------------------
    		function avia_iframe_parameters(container)
    		{
    			var iframe 	= jQuery('iframe[src*="facebook.com"]', container);
    
    				iframe.each(function()
    				{
    					var current = jQuery(this),
    						src = current.attr('src');
    
    					if(src)
    					{
    						if(src.indexOf('?') !== -1)
    						{
    							src = src.replace(/\locale=es_LA/g, 'locale=en_US');
    						}
    
    						current.attr('src', src);
    					}
    				});
    		}
    
    		avia_iframe_parameters('body');
    	});
    })(jQuery);
    </script>
    <?php
    }
    • This reply was modified 6 years, 9 months ago by jamesrapage.
    #913557

    Hi jamesrapage,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #915146

    Sure. Posted below. Thanks!

    #915234

    Hi jamesrapage,

    Everything is in English on my end. Could you please attach some screenshots of the issue?

    Best regards,
    Victoria

    #915655

    Here it is…screen grab from the browser window. This broswer is set to english. http://www.keycodemedia.com/wp-content/uploads/2018/02/facebook-spanish-localization.png

    #916233

    Hi,

    That is based on the language the video is embeded, it has nothing to do with Enfold at all we are afraid.
    Please consider to take a deeper look either on the code you used or your URL.

    Best regards,
    Basilis

    #916255

    The video shows as English when viewed on multiple machines and in multiple browsers when viewed on Facebook. When embedded in Enfold (simple URL), it appears with Spanish language overlays. I’m not sure what else can be done on our end. Ismael has some code above, so it appears that there is (?) a way to define the language within Enfold?

    I’ll keep looking into it on our end, but I’d appreciate Kriesi reviewing it on their end, too!

    Thanks.

    #916264

    It appears there is a way to define it via API, which I presume Enfold is using? Via their SDK and/or via XML.

    https://developers.facebook.com/docs/plugins/embedded-video-player#language

    #917487

    Hi,

    Yes, if you check and read you will see it depends on your language ( of facebook ).
    Based on your language, that is what it loads.

    Best regards,
    Basilis

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.