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?
Question
cienislaw
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)) return; 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); }
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 accountSign in
Already have an account? Sign in here.
Sign In Now