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!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.