Skip to content

Instantly share code, notes, and snippets.

@mkideal
Created May 7, 2016 05:47
Show Gist options
  • Save mkideal/c4da4d7544b55a4505610bb35a3ea661 to your computer and use it in GitHub Desktop.
Save mkideal/c4da4d7544b55a4505610bb35a3ea661 to your computer and use it in GitHub Desktop.
google_translate_element
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'zh-CN', includedLanguages: 'de,en,fr,ja,ko,ru,zh-TW', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
@NomadAndInLove
Copy link

NomadAndInLove commented Apr 23, 2021

Is there a way to change this so that the script adds rel attributes to the following link that's added to my site?

<a class="goog-logo-link" href="https://translate.google.com" target="_blank" rel="noopener noreferrer"><img src="https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_42x16dp.png" width="37px" height="14px" style="padding-right: 3px" alt="Google Translate">Translate</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment