1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Change all facebook-info to another language

Discussion in 'XenForo Questions and Support' started by Biirds, Dec 27, 2011.

  1. Biirds

    Biirds Member

    I don't mean by just changing phrases. I mean changing the information that comes from facebook, for instance "you have 10 friends that are using this site with facebook.

    Accordng to facebbok it seems the change has to be done in the javascript sdk:

    <div id="fb-root"></div>
    <script>(function(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/sv_SE/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    Seems like this line will translate everything to swedish for example: js.src = "//connect.facebook.net/sv_SE/all.js#xfbml=1";

    So.. How is this possible for me to change?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The language is picked up from the forum language/locale setting.

    Do you need it to be different from that?

    If so, you can hard code it in the PAGE_CONTAINER template.

    <html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'}" xmlns:fb="http://www.facebook.com/2008/fbml">
  3. Biirds

    Biirds Member

    My bad.. Had forgot to choose the language locale setting. Thanks :)

Share This Page