How do I force the bot language?

You can force the bot language (if your bot is configured with that language) using the following widget code (which goes into the HTML of your web page):

<script type="text/javascript">
  if (!Array.isArray(window.qbOptions)) {
    window.qbOptions = []
  }
  window.qbOptions.push({
    "use":"sadfasdfasdfas/wj0M8mVgeJrRW4qY",
    "language": "de-de"
  });
</script>
<script type="text/javascript" src="https://static.botsrv.com/website/js/widget2.ea14eec4.js" integrity="sha384-eIQOpcMrVK2La47/uGhqpJMnpRZ4rtYQpRgr1/EbeF2HLFSPGoMsegUKf2xJUcuP" crossorigin="anonymous" async defer></script>

Note: you can do the same thing when iFraming the Quriobot or on the Quriobot Landing Page by simply adding ?lang=de-de at the end of the URL

Did you notice the lang parameter which you can set manually? In this example, it is the German language.

A list of supported locales (languages) can be found here.

In some cases or frameworks, the target language is not known at the time of the HTML rendering but later after the page is loaded.

For example, bablic website translation service allows us to get the target language using its JS API like this:

bablic.targetLocale.iso.toLocaleLowerCase()

To make Quriobot in sync with the target language of the website, you can initialize the Quriobot widget explicitly and force the language, by putting such tag before closing:

<script type="text/javascript">
  if (!Array.isArray(window.qbOptions)) {
    window.qbOptions = []
  }
  window.qbOptions.push({
    "use": "sadfasdfasdfas/wj0M8mVgeJrRW4qY",
    "init": "explicit"
  });
</script>
<script type="text/javascript" src="https://static.botsrv.com/website/js/widget2.ea14eec4.js" integrity="sha384-eIQOpcMrVK2La47/uGhqpJMnpRZ4rtYQpRgr1/EbeF2HLFSPGoMsegUKf2xJUcuP" crossorigin="anonymous" async defer></script>

<script type="text/javascript">
document.addEventListener('bablicdone', function() {
    quriobot.init({
        "language": bablic.targetLocale.iso.toLocaleLowerCase()
    })
})
</script>

Edit this page