Skip to main content
Version: v12.0.0

Adding Exceptions

In some cases, there may be a conflict between the Hand Talk code and a script on the site. To avoid this conflict, simply add this element as an exception.

ID and CLASS Exception Handling

If your site has a conflict problem with a carousel script, for example, you can add the element in the exceptions property.

Declare which ID or CLASS will not use Hand Talk, as well as any of its child elements, i.e. when you declare that #carousel will not use the translation, nothing within this DIV or element will be translated. These elements must be enclosed in quotation marks and separated by a comma:

exceptions: [“#menu”, “#carousel”, “.lists”, “.form”]

In the example below, we put in the exception an HTML element ID and a CSS class, consecutively.

<body>
<!-- There is no reference to the element below in the exception list, so it will be translated. -->
<h1 id="title">Hand Talk</h1>
<!-- The “form” class is being ignored, so all the content of this form will not be translated. -->
<form class="form">
<input type="text" placeholder="Insert the text">
<input type="submit" value="Search">
</form>
<!-- This slide will be ignored because the id “carousel” has been added to the exception list -->
<div id="carousel">
<div>My slide 1</div>
<div>My slide 2</div>
<div>My slide 3</div>
</div>
<!-- Get the latest version of the Hand Talk plugin -->
<script src="https://plugin.handtalk.me/web/latest/handtalk.min.js"></script>
<script>
var ht = new HT({
// Exchange it for your access token
token: "TOKEN",
// Ignores all content that has the referenced id/class
exceptions: ["#carousel", ".form"]
});
</script>
</body>
Warning

By adding the content as an exception, it will not be translated by Hand Talk.

Important

Depending on the programming language and/or logic applied in the development of the website, in order to enable full operation or improve the results obtained by the service, it may be necessary to make other customizations to the Hand Talk code, which must be done by the client.