Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #194311

    swohlert
    Participant

    Hello,

    I’m creating a site and want to use the FB comments plugin you provide. Is there any way to force the plugin to use a certain language. I have already set the language on the FB dev dashboard to Dutch but that didn’t help.

    Also tried looking for language files to manually translate but they’re not included.

    Any help is appreciated.

    Thanks

    #195013

    Christopher
    Moderator

    Hi there,

    Please add this in functions.php file located in child theme folder:

    if ( ! function_exists( 'x_facebook_sdk' ) ) :
      function x_facebook_sdk() {
    
        require( X_FACEBOOK_COMMENTS_PATH . '/functions/options.php' ); ?>
    
        <div id="fb-root"></div>
    
        <script>
          window.fbAsyncInit = function() {
            FB.init({
              appId   : '<?php echo $x_facebook_comments_app_id; ?>',
              xfbml   : true,
              version : 'v2.1'
            });
          };
    
          (function(d, s, id){
             var js, fjs = d.getElementsByTagName(s)[0];
             if (d.getElementById(id)) {return;}
             js = d.createElement(s); js.id = id;
             js.src = "//connect.facebook.net/en_US/sdk.js";
             fjs.parentNode.insertBefore(js, fjs);
           }(document, 'script', 'facebook-jssdk'));
        </script>
    
      <?php }
    endif;

    Then change this //connect.facebook.net/en_US/sdk.js

    Please check this : https://developers.facebook.com/docs/internationalization/.

    Hope it helps.