Translating the Guesty Booking Engine

Have more questions? Submit a request
Enable guests to view the content of your Guesty Booking Engine in various languages automatically by embedding a custom code. Follow the instructions below.

Important:

Using this advanced feature without a developer may cause technical issues. Guesty does not offer support for technical difficulties associated with custom code snippets. 

Step by Step:

  1. Sign in to your Guesty account.
  2. In the top menu, click Integrations.
  3. From the drop-down, click Distribution.
  4. Click the Guesty Booking Engine thumbnail.
  5. Click Edit next to the relevant engine.
  6. Scroll down to "Custom Snippets - Advanced usage" and turn the toggle on.
  7. Add the following custom code and click Save.
See an example of the custom code below:
<script type="text/javascript">
  var GOOGLE_ID = 'google_translate_element';

  function googleTranslateElementInit() {
    new google.translate.TranslateElement({pageLanguage: 'en'}, GOOGLE_ID);
  }

  if (!document.getElementById(GOOGLE_ID)) {
    var div = document.createElement('div');
    div.id = GOOGLE_ID;
    div.style.marginLeft ='20px';
    div.style.textAlign ='center';

    var navbar = document.querySelector('#root > div > header') || document.querySelector('#root > div > nav');
    navbar.appendChild(div);

    var script = document.createElement('script');
    script.src = '//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit';
    document.body.appendChild(script);
  }
</script>

Note:

This code is powered by Google Translate. Any translation errors is not supported by Guesty. Once the code has been embedded, guests can navigate to the top right corner of the Booking Engine and change the language.

Was this article helpful?
0 out of 0 found this helpful