javascript - How to change Google Sign-in button language -
so here's problem: have default google sign-in button in page , need change it's language.
i render with:
gapi.signin2.render('google-button', { 'scope': 'profile email', 'width': 122, 'height': 39, ... });
i've tried several solutions throughout web. being:
inserting lang object in api's script tag:
<script src="https://apis.google.com/js/platform.js" async defer > {lang:'pt'} </script>
setting ___gcfg:
window.___gcfg = { lang: 'pt' };
setting lang attribute in html tag
<html lang="pt">
adding parameter api's url
<script src="https://apis.google.com/js/platform.js?hl=pt" . . .
and place found in google's documentation, redirects page says nothing this. (https://developers.google.com/identity/sign-in/web/build-button)
i avoid building custom button because of branding guidelines, me?
ps: i'm using react.js
many thanks!
in google sign-in websites can change language button.
only option following instructions of section: https://developers.google.com/identity/sign-in/web/build-button#building_a_button_with_a_custom_graphic
Comments
Post a Comment