This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.___gcfg = { | |
lang: 'zh-CN' | |
}; | |
(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> | |
<g:plusone></g:plusone> |
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