How to add Google Translate to your website

Sometimes you would like to add to your website a quick widget to allow your users to translate into their language. Google has a simple widget that you can add with some lines of code:

    function googleTranslateElementInit() {
        new google.translate.TranslateElement(
            //here you add the supported languages like en, es, zh, nl, de, etc.
            {pageLanguage: 'en'},

<div id="google_translate_element"></div>

And that's all.