title: google translate dropdown - set the language option label in that language itself
body: <p>I have used google translate element with code:</p>
  <pre><code>&lt;div id=&quot;google_translate_element&quot;&gt;&lt;/div&gt;
  function googleTranslateElementInit() {
      new google.translate.TranslateElement({
          pageLanguage: 'en'
      }, 'google_translate_element');
  }
  &lt;script type=&quot;text/javascript&quot; src=&quot;//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit&quot;&gt;
  </code></pre>
  
  <p>This gives me standard language selector dropdown with english labels.</p>
  <p>How can I customize the language label to be in that language itself?
  The result that I want is:</p>
  <pre><code>&lt;select&gt;
  &lt;option selected=&quot;selected&quot; value=&quot;&quot;&gt;select&lt;/option&gt;
  &lt;option value=&quot;af&quot;&gt;Afrikaans&lt;/option&gt;
  &lt;option value=&quot;sq&quot;&gt;shqip&lt;/option&gt;
  &lt;option dir=&quot;ltr&quot; value=&quot;ar&quot;&gt;العربية&lt;/option&gt;
  &lt;option value=&quot;be&quot;&gt;Беларуская&lt;/option&gt;
  &lt;option value=&quot;bg&quot;&gt;български&lt;/option&gt;
  &lt;option value=&quot;ca&quot;&gt;català&lt;/option&gt;
  &lt;option value=&quot;zh-CN&quot;&gt;中文(简体)&lt;/option&gt;
  &lt;option value=&quot;zh-TW&quot;&gt;中文(繁體)&lt;/option&gt;
  &lt;option value=&quot;hr&quot;&gt;Hrvatska&lt;/option&gt;
  &lt;option value=&quot;cs&quot;&gt;česky&lt;/option&gt;
  &lt;option value=&quot;da&quot;&gt;Dansk&lt;/option&gt;
  &lt;option value=&quot;nl&quot;&gt;Nederlands&lt;/option&gt;
  &lt;option value=&quot;et&quot;&gt;Eesti&lt;/option&gt;
  &lt;option value=&quot;tl&quot;&gt;Filipino&lt;/option&gt;
  &lt;option value=&quot;fi&quot;&gt;suomi&lt;/option&gt;
  &lt;option value=&quot;fr&quot;&gt;Français&lt;/option&gt;
  &lt;option value=&quot;gl&quot;&gt;Galego&lt;/option&gt;
  &lt;option value=&quot;de&quot;&gt;Deutsch&lt;/option&gt;
  &lt;option value=&quot;el&quot;&gt;Ελληνικά&lt;/option&gt;
  &lt;option dir=&quot;ltr&quot; value=&quot;iw&quot;&gt;עברית&lt;/option&gt;
  &lt;option value=&quot;hi&quot;&gt;हिन्दी&lt;/option&gt;
  &lt;option value=&quot;hu&quot;&gt;magyar&lt;/option&gt;
  &lt;option value=&quot;is&quot;&gt;Íslenska&lt;/option&gt;
  &lt;option value=&quot;id&quot;&gt;Indonesia&lt;/option&gt;
  &lt;option value=&quot;ga&quot;&gt;Gaeilge&lt;/option&gt;
  &lt;option value=&quot;it&quot;&gt;Italiano&lt;/option&gt;
  &lt;option value=&quot;ja&quot;&gt;日本語&lt;/option&gt;
  &lt;option value=&quot;ko&quot;&gt;한국어&lt;/option&gt;
  ....
  &lt;/select&gt;
  </code></pre>
  <p><strong>UPDATE</strong>
  I though of replacing the innerHTML of the google-generated select</p>
  <pre><code>var googleDropdown = $(&quot;#google_translate_element .goog-te-combo&quot;);
  var customDropdown = $(&quot;#custom-translate&quot;);
  googleDropdown.innerHTML = customDropdown.innerHTML;
  </code></pre>
  <p>The custom select:</p>
  <pre><code>&lt;select id=&quot;custom-translate&quot; style=&quot;display:none;&quot;&gt;
    &lt;option value=&quot;&quot;&gt;Select Language&lt;/option&gt;
    &lt;option value=&quot;af&quot;&gt;Afrikaans&lt;/option&gt;
    &lt;option value=&quot;sq&quot;&gt;Albanian&lt;/option&gt;
    &lt;option value=&quot;am&quot;&gt;Amharic&lt;/option&gt;
    &lt;option value=&quot;ar&quot;&gt;Arabic (العربية)&lt;/option&gt;
    ...
  &lt;/select&gt;
  </code></pre>
  <p>This works when I try it on the console when everything is loaded, but when I add this code in file, the problem is googleTranslateElementInit executes in the end.</p>
  <p>So how do I make my code execute after the google translate is done?</p>