Booking Engine: Add Google Translate Follow
How to add Google Translate to your Booking Engine?
You can add a Google Translate snippet in Booking Engine > Advanced > Header Script > Save.
Google Translate Script
The Google Translate button will appear on the top right of the menu.
It will also appear on the mobile version.
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}var div = document.createElement("div");
div.id = "google_translate_element";
div.style.marginRight ="20px";
div.style.textAlign ="center"
div.style.display ="flex"
div.style.alignItems ="center"
var navbar = document.getElementsByTagName("nav")[0];
navbar.after(div);
var script = document.createElement('script');
script.src = "//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
document.body.appendChild(script);
</script>
<style>
.navbar .fixed-top {
top:40px !important;
}
</style>
Comments
0 comments
Please sign in to leave a comment.