How can the language of the Facebook "like" button be changed?
Asked Answered
D

2

17

I use Facebook like button on my web page with Facebook comments plugin and until now it works oK. Today I realized that it displays in three different languages (English, Czech and Slovak) in three different browsers. The problem is with different width of each language. Here I've tried to change en_US to sk, but with no effect:

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
Dobla answered 26/7, 2011 at 9:8 Comment(0)
C
33

Change your script request to one supported by FB. In my case, i switched form english to spanish bo doing this:

before

js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

after

 js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1";

Available options in

https://www.facebook.com/translations/FacebookLocales.xml

Capeskin answered 12/2, 2013 at 19:51 Comment(0)
E
6

As @tomasbarrios already said, the language pointed out in the URL, for the DEFAULT language of the text. However, if a person has her/his Facebook account already open, such setting is superseded by the default language of THE ACCOUNT'S language. But that will change according to each individual's own settings, which is a desirable behavior.

To add to the already good note by @tomasbarrios , I add this complementary link, that might help you contextualize, that Facebook's official docs don't offer a better list for that: https://developers.facebook.com/docs/internationalization#locales (a typical case of a poor official documentation...)

In the site blogtricks you will find a better reading than that of the official documentation, at least for beginners in this specific point: http://www.mybloggertricks.com/2011/06/facebook-like-and-send-button-in-108.html

Effects answered 4/9, 2014 at 1:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.