WordPress.org

Forums

Facebook
[resolved] Change button language? (9 posts)

  1. Distiple
    Member
    Posted 2 years ago #

    Is there any way to change the language of the buttons, or at least their alignment?

    Showing up in English on a right to left site, the follow button is cut off.

    http://wordpress.org/extend/plugins/facebook/

  2. Niall Kennedy
    Member
    Plugin Author

    Posted 2 years ago #

    The buttons are Facebook social plugins interpreted by the Facebook JavaScript SDK. The JavaScript SDK can be loaded with a specific Facebook locale; English United States is the default.

    The Facebook for WordPress plugin tries to load the appropriate Facebook locale based on your WordPress site's locale value. You can also act on the fb_locale filter to directly set.

    Some sites have plugin or theme code loading a version of the Facebook PHP SDK before the Facebook for WordPress plugin, typically in the default language of English United States. Search your page source code for connect.facebook.net to find possible multiple declarations of the Facebook JavaScript SDK to remove other plugins or theme functions that might be loading a language not specific to your WordPress install.

  3. Distiple
    Member
    Posted 2 years ago #

    Thanks for your reply.

    I did find one other instance of the FB SDK, and it does indeed use English as the defined language, but it seems to be this plugin. no?

    <script type='text/javascript' src='http://wordsandmusic.me/wp-includes/js/admin-bar.min.js?ver=3.5.1'></script>
    <script type='text/javascript'>
    /* <![CDATA[ */
    var FB_WP=FB_WP||{};FB_WP.queue={_methods:[],flushed:false,add:function(fn){FB_WP.queue.flushed?fn():FB_WP.queue._methods.push(fn)},flush:function(){for(var fn;fn=FB_WP.queue._methods.shift();){fn()}FB_WP.queue.flushed=true}};window.fbAsyncInit=function(){FB.init({"channelUrl":"http:\/\/wordsandmusic.me\/wp-content\/plugins\/facebook\/channel.php","xfbml":true,"appId":"454592147914091"});if(FB_WP && FB_WP.queue && FB_WP.queue.flush){FB_WP.queue.flush()}}
    /* ]]> */
    </script>
    <div id="fb-root"></div><script type="text/javascript">(function(d){var id="facebook-jssdk";if(!d.getElementById(id)){var js=d.createElement("script"),ref=d.getElementsByTagName("script")[0];js.id=id,js.async=true,js.src="http:\/\/connect.facebook.net\/en_US\/all.js",ref.parentNode.insertBefore(js,ref)}})(document)</script>
    <script type='text/javascript' src=''></script>
    <!--stats_footer_test-->	<script type="text/javascript">

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  4. lacanadienne58
    Member
    Posted 2 years ago #

    hello,

    how to manage a 3 languages website ?

    after publishing a post in a language (for example in German), all like buttons turn on this language (even those of french and english posts):

    http://www.coupes-moto-legende.fr

    thank you

  5. mischa
    Member
    Posted 1 year ago #

    I've installed the plugin using a Dutch WordPress Back-end for an Australian Website. The like button on the front-end is now displayed in Dutch. this should be English. In the PHP I see'public $locale = 'en_US';' I thought it should display in English in this case?

    Kind regards,
    Mischa

  6. Niall Kennedy
    Member
    Plugin Author

    Posted 1 year ago #

    Act on the fb_locale filter to set your site's Facebook locale if your backend locale is different than your frontend locale.

  7. mischa
    Member
    Posted 1 year ago #

    I changed the back-end to English, but still see it in Dutch on the frontend. Don't know what it does on an english system: http://insideoutbythea-imageconsulting-perth.com/

    Don't really undertand with what you mean with:
    Act on the fb_locale filter to set your site's Facebook locale if your backend locale is different than your frontend locale.

    I make changes in the plugin?

  8. Niall Kennedy
    Member
    Plugin Author

    Posted 1 year ago #

    http://codex.wordpress.org/Glossary#Filter

    A filter is a way for you to customize the behavior of the Facebook plugin for WordPress without directly editing its code. You create a new function (in a plugin, in your theme's functions.php file, etc.) to override the default behavior of the plugin. In this case you may want to override a locale value of nl_NL with a locale value of en_GB for British English.

  9. mischa
    Member
    Posted 1 year ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic