This guide shows how to add a Google Translate snippet to your decision tree interface so users can select their preferred language from a dropdown menu. Once a language is selected, the content will automatically translate, making your decision tree accessible to a wider audience. The guide covers the simple script insertion and configuration needed to enable multi-language support using Google Translate.

Step 1: Go to Decision Tree Appearance Settings

Step 2: Go to Header & Footer, Enable “Display Footer” and copy paste this code.

<div id="google_translate_element" style="text-align: center;"></div>

Step 3: Save and Exit and then go to your Decision Tree Scripts

Step 4: Add this script under Decision Tree scripts. (Set above </body>)

<script type="text/javascript">
  function googleTranslateElementInit() {
    new google.translate.TranslateElement({
      pageLanguage: 'en',
      includedLanguages: 'en,fr,fil,cy,ko,es',
      layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element');
  }
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Step 5: Save and Exit then republish the DT.

You can include more languages by modifying this line:

includedLanguages: 'en,fr,fil,cy,ko,es',

Output: Google Translate Dropdown will appear in your decision tree footer.