Spanish language in the button Gogle +1

  • Posts: 41
  • Thank you received: 0
12 years 3 months ago #36644

Hi

Please where I can change the language to Spanish in the button "Google +1" in products?

Thank you

Andreu

Last edit: 12 years 3 months ago by diosneptuno.

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
12 years 3 months ago #36699

Hi,

Could you try to change the code:
$body=str_replace('</head>', '<script type="text/javascript" src=" apis.google.com/js/plusone.js "></script></head>', $body);

by:
$mainLang = &JFactory::getLanguage();
$tag = $mainLang->get('tag');
if(!in_array($tag,array('zh-CN','zh-TW','en-GB','en-US','pt-BR','pt-PT'))) $tag=strtolower(substr($tag,0,2));
$lang = '{"lang": "'.$tag.'"}';
$body=str_replace('</head>', '<script type="text/javascript" src=" apis.google.com/js/plusone.js ">'.$lang.'</script></head>', $body);

in the file plugins/content/hikashopsocial.php
That should allow google to use the correct language automatically.

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 0
12 years 3 months ago #36850

Hello Nicolas:

Not works well, is still in English not in Spanish :(
Any other ideas?

Thank you

Andreu

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
12 years 3 months ago #36852

Hi,

We included the modification in the new release of HikaShop that we did yesterday. The modification is working great. You can see it on our demo website. When you change the language, the google +1 language changes too.

So you can just update HikaShop to the new version and it should work for you too. The new version can be downloaded on your subscription page (or the download page for the Starter edition) on our website

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 0
12 years 3 months ago #36855

Hi

Thank you very much, I have the bussines edition, I will update now.

Andreu

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 0
12 years 3 months ago #36891

Hi Nicolas:

Thank you very much, I have updated and now works perfect

Andreu

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum