How to change the default language on my website bot?

SDK also supports multi-language bots where the user can seamlessly switch between multiple languages.

The default language first loaded can be changed by adding the initialize-language parameter

'initialize-language': 'hi'

Full Example:

<!DOCTYPE html>
<html>
<head>
<title>Haptik JS SDK Multi Language Demo</title>
<meta charset="UTF-8">
<meta content="width=device-width; initial-scale=1.0;" name="viewport">
</head>
<body>
<div style="width: 100%; padding-top: 100px;">
<div style="max-width: 7000px; margin: 0 auto; padding: 0 40px; text-align: left;">
<h4>Haptik JS SDK</h4>
</div>
</div>
</body>
<script type="text/javascript">
window.haptikInitSettings = {
"business-id": "<business-id>",
"client-id": "<client-id>",
"base-url": "<base-url>",
'initialize-language': 'hi'
};
</script>
<script type="text/javascript" charset="UTF-8" src="https://toolassets.haptikapi.com/platform/javascript-xdk/production/loader.js"></script>
</html>

SDK Method HaptikSDK.changeLanguage() can be used to change the language of the bot programmatically as well.

Presently, we do not support changing the size of the change language button.


Can’t find what you’re looking for? Email us at support@haptik.ai.