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:

  1. inserting lang object in api's script tag:

    <script src="https://apis.google.com/js/platform.js" async defer >      {lang:'pt'} </script> 
  2. setting ___gcfg:

    window.___gcfg = {     lang: 'pt' }; 
  3. setting lang attribute in html tag

    <html lang="pt"> 
  4. 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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -