title: Google Translate Element get current language
body: <p>I am using Google translate on my website with:</p>
  <pre><code>let lang = new google.translate.TranslateElement({pageLanguage: 'pt', autoDisplay: false}, 'google_translate_element');
  </code></pre>
  <p>Now I want to get the current language so I do console.log(lang) which gives me:</p>
  <p><a href="https://i.stack.imgur.com/KZwqx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KZwqx.png" alt="enter image description here" /></a></p>
  <p>In &quot;P&quot; I find the language but I am not able to access &quot;P&quot;</p>
  <pre><code>console.log(google.translate.TranslateElement('google_translate_element').P)
  console.log(google.translate.TranslateElement('google_translate_element')['P'])
  </code></pre>
  <p>all just return <code>undefined</code>.</p>
  <p>Any idea how to get that &quot;en&quot;?</p>