title: How to change Google Sign-in button language
body: <p>So here's my problem: I have a default Google Sign-in button in my page and need to change it's language.</p>
  
  <p>I render it with:</p>
  
  <pre><code>gapi.signin2.render('google-button', {
      'scope': 'profile email',
      'width': 122,
      'height': 39, 
      ...
  });
  </code></pre>
  
  <p>I've tried several solutions throughout the web. Those being:</p>
  
  <ol>
  <li><p>Inserting lang object in the API's <em>script</em> tag:</p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/platform.js" async defer &gt; 
      {lang:'pt'}
  &lt;/script&gt;
  </code></pre></li>
  <li><p>Setting ___gcfg:</p>
  
  <pre><code>window.___gcfg = {
      lang: 'pt'
  };
  </code></pre></li>
  <li><p>Setting the <em>lang</em> attribute in the <em>html</em> tag</p>
  
  <pre><code>&lt;html lang="pt"&gt;
  </code></pre></li>
  <li><p>Adding a parameter to the API's URL</p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/platform.js?hl=pt" . . .
  </code></pre></li>
  </ol>
  
  <p>And the only place I found something about this in Google's documentation, it redirects to a page that says nothing about this. (<a href="https://developers.google.com/identity/sign-in/web/build-button" rel="noreferrer">https://developers.google.com/identity/sign-in/web/build-button</a>)</p>
  
  <p>I really would like to avoid building a custom button because of the branding guidelines, could someone help me? </p>
  
  <p>PS: I'm using React.js</p>
  
  <p>Many thanks!</p>