Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0

Block Facebook - hardcoded English language


blockfacebook.js has hardcoded English language setting for Facebook block. I've hacked it by hand, but ideal would be fixing it, so it will work well with multilanguage sites. just need  to pass selected language iso code needed to create proper facebook js script link - any suggestions how it could be done?

js.src = "//connect.facebook.net/$ISO_CODE_HERE/sdk.js#xfbml=1&version=v3.2";


$(document).ready(function() {
	initfb(document, 'script', 'facebook-jssdk');

function initfb(d, s, id)
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id))
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=334341610034299";
	fjs.parentNode.insertBefore(js, fjs);


  • Like 1

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now