Skip to main content
Commonmark migration
Source Link

After trying a lot of extensions, I've ended up uninstalling all the extensions and add the social buttons by myself via code.

Apparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically trnaslated in other language.

My website has 2 languages (and store views), but I can not find how to swap the button text and the social popup content for sharing automatically.

So, now the trouble is:

I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian.

Is it possible to change this?

###This is the code inside the file "view.phtml":

This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I tried to replace

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappears.

After trying a lot of extensions, I've ended up uninstalling all the extensions and add the social buttons by myself via code.

Apparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically trnaslated in other language.

My website has 2 languages (and store views), but I can not find how to swap the button text and the social popup content for sharing automatically.

So, now the trouble is:

I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian.

Is it possible to change this?

###This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I tried to replace

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappears.

After trying a lot of extensions, I've ended up uninstalling all the extensions and add the social buttons by myself via code.

Apparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically trnaslated in other language.

My website has 2 languages (and store views), but I can not find how to swap the button text and the social popup content for sharing automatically.

So, now the trouble is:

I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian.

Is it possible to change this?

This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I tried to replace

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappears.

spelling, remove useless tags
Source Link
Fabian Schmengler
  • 66.1k
  • 25
  • 188
  • 422

Magento Facebook "like" button multilanguage

After trying a lotolot of extensions, I've ended up uninstalling all the extensions and add the social buttons by myself via code. Aparently

Apparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically traslatedtrnaslated in other language. My

My website havehas 2 languagelanguages (and store views)  , but I can not find how to swap automatically the button text and the social popup content for sharing automatically. So

So, now the troubeltrouble is  : I

I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian. Is

Is it possible to change this? This

###This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I tridtried to change thereplace

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappers. If you have any suggestion it will be greatly appreciateddisappears.

Magento Facebook "like" button multilanguage

After trying a loto of extensions I've ended up uninstalling all the extensions and add the social buttons by myself via code. Aparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically traslated in other language. My website have 2 language (and store views)  , but I can not find how to swap automatically the button text and the social popup content for sharing. So, now the troubel is  : I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian. Is it possible to change this? This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I trid to change the

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappers. If you have any suggestion it will be greatly appreciated.

Facebook "like" button multilanguage

After trying a lot of extensions, I've ended up uninstalling all the extensions and add the social buttons by myself via code.

Apparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically trnaslated in other language.

My website has 2 languages (and store views), but I can not find how to swap the button text and the social popup content for sharing automatically.

So, now the trouble is:

I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian.

Is it possible to change this?

###This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I tried to replace

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappears.

Source Link
giancarlo
  • 151
  • 1
  • 1
  • 7

Magento Facebook "like" button multilanguage

After trying a loto of extensions I've ended up uninstalling all the extensions and add the social buttons by myself via code. Aparently I managed to create the buttons correctly (altough the Facebook button takes a HUGE amount of sec. to load) but I'm struggling to have these buttons automatically traslated in other language. My website have 2 language (and store views) , but I can not find how to swap automatically the button text and the social popup content for sharing. So, now the troubel is : I have the FB "like" button in Italian, when I change store view for English I still have the FB "like" button (and the content of the FB box for sharing the product) in Italian. Is it possible to change this? This is the code inside the file "view.phtml":

 <div id="facebook_like_product_button"><fb:like ref="product_page" layout="button_count" show_faces="false" colorscheme="light" width="500"></fb:like></div>

<!-- Facebook Like Product Button BEGIN - load the SDK asynchronously -->
    <div id="fb-root"></div>
        <script>
        /* <![CDATA[ */
            window.fbAsyncInit = function() {
            FB.init({appId: '1386792571543845', status: true, cookie: true,
                xfbml: true});
        };
        (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/<?php echo $this->__('it_IT') ?>/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
         /* ]]> */
        </script>
<!-- Facebook Like Product Button END -->

I trid to change the

<?php echo $this->__('it_IT') ?>

with :

<?php echo $this->getLang() ?>

But the fb button disappers. If you have any suggestion it will be greatly appreciated.