---
description: >-
  Leopard can be told to switching to another language solution's Teneo
  Interaction Engine (TIE) URL based off NER Language Detection.
---

# Language Auto Switch

{% hint style="info" %}
Although this functionality in Leopard was created to showcase the ability to switch solutions based off the spoken language of the user it could just as well be applied in alternative scenarios.&#x20;

For instance maybe you have separate Teneo Solutions that handle different domains of knowledge. If a classifier in one solution knew that the user's question related to something in another solution then a switch could be triggered.
{% endhint %}

## Output Parameters

To tell Leopard that a switch needs to occur you must define a **couple** output parameters in the `Source Solution`.

```
langinput = User input text you want to send to the new Teneo Runtime URL
```

The language Input will usually be the captured user input that triggered a flow that looks for alternative languages spoken.&#x20;

```
langengineurl = the new target Teneo Interaction Engine URL
```

With both of these output parameters Leopard will automatically make a request to the new TIE url and it will pass the text found in the `langinput` output parameter as the user input.  For the remainder of the user's session, Leopard will continue to communicate with the new TIE server.&#x20;

If you want the Leopard UI to show labels in the respective language then you mush specify the following output parameter.

```
lang=en/es/de/nl/fr/ru
```

To have the Leopard UI load a different Iframe for the new language solution then specify the URL as an output parameter.

```
langurl=https://some-new-url.es/
```

If you have the **Amazon Polly voices** enabled you will need to send an output parameter that instructs Leopard to switch the voice.

```
voice=Ruben
```

{% hint style="info" %}
A list of available Amazon Polly voices can be found here: [https://docs.aws.amazon.com/polly/latest/dg/voicelist.html](https://docs.aws.amazon.com/polly/latest/dg/voicelist.html)
{% endhint %}

## Additional Output Parameters

You can control not just the new target iframe url and TIE url but also the Leopard Chat Title and locale for UI labels and ASR and TTS.

## Language Condition

```
%$RU.LANG:{lob.confidence>0.78}
```

### Screenshot

<div align="left"><img src="https://4062709520-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-La71Iy76rotlqbCOWoQ%2F-Lc3PSk9rRj3uPcKFL8l%2F-Lc3PuWr7uXYib1SOdKD%2Flanguage-handover.jpg?alt=media&#x26;token=af6b2b20-1c86-4e52-a0d7-4391d3200211" alt=""></div>
