Thursday, March 15, 2012

Localizing the Google +1 button plugin code

Localizing the Google +1 button plugin code was kinda a mystery. The documentation for it was difficult for me to find. So i've written this quick how to localize the Google +1 button plugin code.



The trick to it is to use a little documented window.___gcfg object, setting the 'lang' property to the language of your choice. Please note, you will need to do this prior to the loading of the plusone.js code. If you do it afterwards, then the language you specified will be ignored!!

Here's the list of available languages.

I hope this helps you along your way to making the best possible user experience on your website.
Happy coding!!

No comments:

Post a Comment