Google translate using a link click : <p>I recently saw a website that used Google Translate in their page, but instead of using the widget, they listed the available languages via links. Click a link and it translates the page.</p>

<p>Has anyone ever done this? I tried to parse through the page to figure out how it was done but I don't see much different than when I use the widget. Here's some of my code:</p>

<pre><code>&lt;h3&gt;Translate&lt;/h3&gt;
&lt;ul class="google-translate-six"&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|es)" title="View this site in Spanish."&gt;Español&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|zh-CN)" title="View this site in Chinese."&gt;中文&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|it)" title="View this site in Italian."&gt;Italiano&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|pl)" title="View this site in Polish."&gt;Polskie&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|ht)" title="View this site in Haitian Creole."&gt;Kreyòl Ayisyen&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|pt)" title="View this site in Portuguese."&gt;Português&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="?/#googtrans(en|en)" title="View this site in English."&gt;English&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;script type="text/javascript"&gt;
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({
    pageLanguage: 'en',
    autoDisplay: false,
    gaTrack: true,
    gaId: 'wewe',
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element');
  }
&lt;/script&gt;
&lt;script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"&gt;&lt;/script&gt;
</code></pre>

<p>Thanks! The site I'm referring to is: <a href="https://www.baltimorecountymd.gov/index.html" rel="noreferrer">https://www.baltimorecountymd.gov/index.html</a>. The Translate section is at the bottom right portion of the page.</p>

<p>Thanks everyone!</p>
