Search code examples
htmlfacebookfacebook-sharer

Force English Language in Facebook Share button label


On a website I'm testing I have some share buttons (using a plugin) to various social networks.

Facebook share button appears to be getting the language label from the language that the user is using on his Facebook. Since the website has the majority of visitors from Greece, which some have their facebook setups in English and some in Greek, when the Share label is written in Greek it pushes all the other buttons to another line, resulting in an ugly layout.

Is there a way to force Facebook always use the English Share button? any workarounds or hacks? I can't think of any right now... Any help would be much appreciated! :)


Solution

  • https://developers.facebook.com/docs/plugins/share-button

    If you use the Share Plugin, you can just change the locale in the SDK URL. It is this line of code:

    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=xxx&version=v2.0";
    

    Just change "en_US" to another valid one. German would be "de_DE", for example.