Skip to main content

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
  1. 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
Select component display value and option value mapping
Display valueOption value
Chinesezh
Englishen
Japaneseja
  1. 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
  1. Click Save in the upper-right corner of the page.

2.2 Step 2: Configure the Connector

For a detailed introduction to YiDA connectors, see Integration & Automation - Connector.
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
  1. 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
  1. 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
  1. 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
  1. Select the connector action: choose the “Translate” action, then click Next. (See Figure 2.2-5.)
Figure 2.2-5 Select the connector action
  1. Configure the connector action, then click Save. (See Figure 2.2-6.)
Figure 2.2-6 Configure the connector action
  1. Add and configure the Create data node. (See Figure 2.2-7.)
Figure 2.2-7 Add and configure the Create data node
  1. 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