Share a multilingual website on Google+

I have a multilingual website that correctly defines the user's language (the language of the site changes accordingly), but cannot be correctly distributed on Google +.

The site exists in two languages, so I created two different sets of meta properties: one for each language:

English:

<link rel="canonical" href="http://en.perehana.com/"/> <meta property="og:title" content="Perehana, the best way to find perfect gifts!"/> <meta property="og:type" content="website"/> <meta property="og:url" content="http://www.perehana.com"/> <meta property="og:image" content="http://www.perehana.com/img/large-icon.jpg"/> <meta property="og:site_name" content="Perehana"/> <meta property="og:description" content="No gift ideas for Christmas, birthdays, weddings, births or any other event? Perehana allows you to enter gift ideas and to reserve your family and friends' ideas before buying them."/> <meta property="og:locale" content="en_GB"/> <meta property="fb:app_id" content="242045389185230"/> <meta property="og:locale:alternate" content="fr_FR"/> <meta itemprop="name" content="Perehana, the best way to find perfect gifts!"/> <meta itemprop="description" content="No gift ideas for Christmas, birthdays, weddings, births or any other event? Perehana allows you to enter gift ideas and to reserve your family and friends' ideas before buying them."/> <meta itemprop="image" content="http://www.perehana.com/img/square_logo.png"/> 

French:

 <link rel="canonical" href="http://fr.perehana.com/"/> <meta property="og:title" content="Perehana, le meilleur moyen de faire plaisir à coup sûr !"/> <meta property="og:type" content="website"/> <meta property="og:url" content="http://www.perehana.com"/> <meta property="og:image" content="http://www.perehana.com/img/large-icon.jpg"/> <meta property="og:site_name" content="Perehana"/> <meta property="og:description" content="En manque d'idées de cadeaux à l'approche de Noël, des anniversaires, des mariages ou des naissances ? Perehana est un site qui vous permet de saisir des idées-cadeaux et de réserver celles de votre famille et de vos amis. Vous pouvez ensuite aller les acheter sans qu'ils le sachent."/> <meta property="og:locale" content="fr_FR"/> <meta property="fb:app_id" content="242045389185230"/> <meta property="og:locale:alternate" content="en_GB"/> <meta itemprop="name" content="Perehana, le meilleur moyen de faire plaisir à coup sûr !"/> <meta itemprop="description" content="En manque d'idées de cadeaux à l'approche de Noël, des anniversaires, des mariages ou des naissances ? Perehana vous permet de saisir des idées-cadeaux et de réserver celles de votre famille et de vos amis. Vous pouvez ensuite aller les acheter sans qu'ils le sachent."/> <meta itemprop="image" content="http://www.perehana.com/img/square_logo.png"/> 

As you can see, the locales and alternatives are set correctly.

So I call the G + API (this is an example for a French user):

 <div class="g-plusone" data-size="medium" data-href="http://www.perehana.com"></div> <script type="text/javascript"> window.___gcfg = { lang: 'fr' }; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> 

According to the user's language, the correct properties are displayed.

The problem occurs when I want to share it via Google+, the name and description that Google automatically selects for the site are in English, even if my G + user account is in French ...: - (

Thanks to everyone who can help!

+4
source share
1 answer

I assume that you are using the Accept-Language HTTP header for this on your website.

The page collector used for sharing on Google+ does not distribute any of the HTTP headers from the user who initiated the action, so your website will be dropped into any default language.

You can get around this by using the GET options to set the language. If you share with the +1 button, share a button or exchange links, you can set the current language to the destination URL parameter , data-href , for this plugin.

It looks like you already sent a feature request for this in the Google+ issue tracker. If it’s not you, send an update notification request.

+1
source

All Articles