> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Artificial Intelligence

> Enable mutual translation between Chinese, English, and Japanese by designing forms and configuring a connector. This page walks you through creating the input form and the form that receives translation results, configuring the automation that triggers translation, and reviewing the final outcome.

## 1. Use Case

Enter a piece of text and get its translation in the target language. Mutual translation between **Chinese, English, and Japanese** is supported.

## 2. Steps

### 2.1 Step 1: Design the Forms

Create two forms: one for entering the text to translate, and one for receiving the translation result.

#### 2.1.1 Create the Input Form

**Steps:**

1. Create a form and name it "Translation document".
2. Add a Single-line text component, name it "Text to translate", and set it as required. (See Figure 2.1-1.)

Figure 2.1-1 Add and configure the Single-line text component

3. Add two Select components, name them "Source language" and "Target language", and set both as required. Define the option content as a custom list. The mapping between the display value and the option value is shown in the table below. (See Figure 2.1-2.)

Figure 2.1-2 Add and configure the Select components

<table>
  <tr>
    <td colSpan={2}>**Select component display value and option value mapping**</td>
  </tr>

  <tr>
    <td>Display value</td>
    <td>Option value</td>
  </tr>

  <tr>
    <td>Chinese</td>
    <td>zh</td>
  </tr>

  <tr>
    <td>English</td>
    <td>en</td>
  </tr>

  <tr>
    <td>Japanese</td>
    <td>ja</td>
  </tr>
</table>

4. Click **Save** in the upper-right corner of the page.

#### 2.1.2 Create the Receiving Form

**Steps:**

1. Create a form and name it "AI translation result".
2. Add a Single-line text component and name it "Translation result". (See Figure 2.1-3.)

Figure 2.1-3 Add and configure the Single-line text component

3. Click **Save** in the upper-right corner of the page.

### 2.2 Step 2: Configure the Connector

<Note>
  For a detailed introduction to YiDA connectors, see [Integration & Automation - Connector](/yida/integration/gqmveiswrxkgxu9s).
</Note>

**Steps:**

1. In the admin console, open the "Translation document" form, go to **Integration & Automation**, and click **Create Integration & Automation**. (See Figure 2.2-1.)

Figure 2.2-1 Connector entry point

2. Name the connector "AI translation", set the trigger type to **Form event trigger**, and click **Save**. (See Figure 2.2-2.)

Figure 2.2-2 Create a connector

3. Configure the form event trigger: set the trigger event to Create success and the data filter to All data, then click **Save**. (See Figure 2.2-3.)

Figure 2.2-3 Configure the form event trigger

4. Select the connector app: choose the "Artificial intelligence" app, then click **Next**. (See Figure 2.2-4.)

Figure 2.2-4 Select the connector app

5. Select the connector action: choose the "Translate" action, then click **Next**. (See Figure 2.2-5.)

Figure 2.2-5 Select the connector action

6. Configure the connector action, then click **Save**. (See Figure 2.2-6.)

Figure 2.2-6 Configure the connector action

7. Add and configure the Create data node. (See Figure 2.2-7.)

Figure 2.2-7 Add and configure the Create data node

8. Click **Save** in the upper-right corner, then click **Publish**.

### 2.3 Step 3: Submit the Form

Submit data through the "Translation document" form to trigger the connector. You can view the translation result in the "AI translation result" form. (See Figure 2.3-1.)

Figure 2.3-1 Submit form data

## 3. Result

Figure 3.1-1 Connector result
