1. jarosz
  2. Commercial Templates
  3. Monday, 09 October 2023
  4.  Subscribe via email
Hello Ciaran
I'd like to add a Google translate button (see attached) to a Skylar website.

This code works in a simple HTML file:
<div id="google_translate_element"></div>

<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{pageLanguage: 'en'},
'google_translate_element'
);
}
</script>

<script type="text/javascript"
src=
"https://translate.google.com/translate_a/element.js?
cb=googleTranslateElementInit">
</script>

But when I add it to the Skylar index.php template file just after the body tag I just get a new blank bar about 50 px deep across the top of the page

Please could you advise on the best way to add Google translate to Skylar?

Many thanks

Michael Jarosz


translate.jpg
Attachments (1)
Accepted Answer Pending Moderation
0
Votes
Undo
us a custom module with the script in it
  1. more than a month ago
  2. Commercial Templates
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!