# Configure multilingual cards

Feishu cards support multilingual settings. After setting multiple languages, the card will automatically display the content in the language corresponding to the user's Feishu client language, meeting international business needs.

## Points to note

If the user's local language environment is not within the range of the message card's multilingual configuration, the card will default to displaying in an available language. For example, if the card is configured in both Chinese and English, but the user's local environment is Japanese, the Feishu client will default to displaying the content in English.

## Supported languages

The card supports configuration in 16 languages, including English, Simplified Chinese, Traditional Chinese (Hong Kong), Traditional Chinese (Taiwan), Japanese, Indonesian, Vietnamese, Thai, Portuguese, Spanish, Korean, German, French, Italian, Russian, and Malay.

## Configure multilingual in the Building Tool
After creating a Feishu card, you can add multilingual card content on the [building tool](https://open.feishu.cn/cardkit?from=open_docs_configure_multi_language) editing page. The limitations and methods for configuring multilingual content for [new and old version cards](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/feishu-card-cardkit/feishu-cardkit-overview) are different. The specific instructions and steps are as follows.

### Configure multilingual content for new version cards

This section introduces how to configure multilingual content for new version cards.

#### **Default language description**

The **default language** in new version cards serves as the fallback language for displaying multilingual content. When the display language of the Feishu client does not match any of the added languages, the content of the **default language** card will be displayed.

#### **Configuration steps**

New version cards only support configuring multilingual content for specific component attributes (including text, rich text, and images). The card structure in different languages must remain consistent. The configuration method is as follows:
1. In the card editor, click **Default Language** > **Multilingual Settings**.

The multilingual settings interface will slide out on the right side of the card editor.

2. In the **Multilingual Settings** interface, click **Add Language**.
2. Select one or more languages, then click **OK**.

You will see the added multilingual cards on the multilingual settings page.

2. In the default language, select components such as text, rich text, and images that support multilingual content configuration, click the multilingual configuration button on the right side of the content, and configure multilingual content in the content pop-up window.
    New version cards only allow configuring multilingual content for specific component attributes (including text, rich text, and images).

2. After configuring the multilingual text and images, you can switch to different language cards to preview the multilingual effects of the cards.
     You can also add, delete, and modify components in the switched multilingual cards. However, note that when editing multilingual cards, the card structure in different languages will always remain consistent. For example, when the input box component is deleted from the **English** language card, the corresponding input box component in other languages will also be deleted.

### Configure multilingual content for old version cards
After creating a Feishu card template, you can add multilingual card content on the [building tool](https://open.feishu.cn/cardkit?from=open_docs_configure_multi_language) editing page. The steps are as follows:
1. Inside the card editor, click **Multilingual Settings**.

1. In the **Multilingual Settings** interface, click **Add Language**.

1. Select a language (e.g., English-English), in the **Add Language** dialog, complete the following configurations, and click **Confirm Addition**.

1. Method One: Click **Copy Existing Language Version**, select an existing language from the **Copy Card Language Version** list, and the system will copy that language's card content into the new card.
    1. Method Two: Click **Add Blank Card**, to create a new blank card.

1. After adding multiple languages, you can switch between the card content of each language in the editor.

1. (Optional) If you need to delete a multilingual card, you can enter **Multilingual Settings**, and in the **Actions** column for the specified language, click the **Delete** icon.

## Configure Multilingual in Card JSON Code

When configuring multi-language support using card JSON code, you can choose to configure it locally or globally within the card. The meanings and scenarios are as follows:
- **Local Multi-language Configuration**: Configure the text and images of specified components within the card for multiple languages. It is recommended to choose the local multi-language configuration method, as it does not require adding the complete card JSON code, making multi-language configuration more convenient.

- **Global Multi-language Configuration**: Add the complete card JSON code corresponding to the language within the card.
### Notes

- If both local and global multi-language configurations are set simultaneously, the global multi-language configuration will take precedence.
- The [Card JSON 2.0 Structure](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/card-json-v2-structure) does not support global multilingual configuration for cards.
- The [Send Messages Visible Only to Specific People](https://open.feishu.cn/document/ukTMukTMukTM/uETOyYjLxkjM24SM5IjN) API does not support local multilingual configuration for cards.

### Configuring Multi-language Support Locally within the Card

You can configure the text and images of specified components within the card for multiple languages, achieving different content effects under different language environments.

![Group 1321315121 (2).png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/775e5da94384ce679898ba5c214d1f92_kVh17gsDhI.png?height=2146&lazyload=true&maxWidth=682&width=3824)

The descriptions of the multi-language fields supported by the card are shown in the table below.

Field | Corresponding Multi-language Field | Applicable Scenario | Field Description
---|---|---|---
content | i18n_content | When the component contains text tags (i.e., attributes with the tag plain_text, lark_md, or markdown), the corresponding content field supports multi-language configuration. | Text content.
default_value | i18n_default_value | default_value is an attribute in the input box component, used to set the default pre-filled content in the input box for the user. | Pre-filled content in the input box for the user.
img_key | i18n_img_key | - The img_key attribute in image, multi-image selection, and multi-image mixed arrangement components.<br>- The img_key attribute in the icon attribute. | The key for image resources. You can call the [Upload Image](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create) API or upload images in the Feishu card building tool to obtain the image key.
file_key | i18n_file_key_key | - The file_key attribute in the audio component | The key of the file resource. You can call the [Upload File](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create) API to upload an audio file and obtain the key of the audio. For more details, refer to the [Audio](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/card-json-v2-components/content-components/audio) component documentation.

To configure multi-language support, you need to add the corresponding i18n field and language fields (such as `en_us`) in the JSON code of the specified component. Below is an example of adding multi-language text in a rich text component:

```json
{
  "tag": "markdown",
  "content": "*Italic*\n**Bold**\n~~Strikethrough~~\n[Text Link](URL)\n[Differentiated Jump](URL)\n",
  "i18n_content": {  
    "en_us": "*Italic*\n**Bold**\n~~Strikethrough~~\n[Text Link](URL)\n[Differentiated Jump](URL)",   // English 
    "zh_cn": "",  // Simplified Chinese
    "zh_hk": "",  // Traditional Chinese (Hong Kong)
    "zh_tw": "",  // Traditional Chinese (Taiwan)
    "ja_jp": "",  // Japanese
    "id_id": "",  // Indonesian
    "vi_vn": "",  // Vietnamese
    "th_th": "",  // Thai
    "pt_br": "",  // Portuguese
    "es_es": "",  // Spanish
    "ko_kr": "",  // Korean
    "de_de": "",  // German
    "fr_fr": "",  // French
    "it_it": "",  // Italian
    "ru_ru": "",  // Russian
    "ms_my": "",  // Malay
  }
}
```

#### Code sample

In the example below, the text properties and image properties in the card's title, plain text, rich text, and image components are configured for multiple languages, achieving the effect shown below:

![Group 1321315121 (1).png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/fae095fa9f2f95413bebe987f2361fb3_dssicP9m1u.png?height=2326&lazyload=true&maxWidth=682&width=3824)

```json
{
  "header": {
    "template": "orange",
    "title": {
      "tag": "plain_text",
      "i18n_content": {
        "en_us": "Check-in reminder",
        "zh_cn": "会议室签到提醒"
      }
    }
  },
  "elements": [
    {
      "tag": "div",
      "text": {
        "content": "签到时间到，你可以签到了",
        "i18n_content": {
          "en_us": "It's time! You can check in now"
        },
        "text_size": "normal",
        "tag": "plain_text"
      }
    },
    {
      "tag": "markdown",
      "content": "**会议室**\n北京-xxx-F1",
      "i18n_content": {
        "en_us": "**Room**\nBeijing-xxx-F1"
      }
    },
    {
      "tag": "markdown",
      "content": "**日程主题**\n<a href='https://open.feishu.cn'>卡片支持局部多语言-产研评审</a>\n12月26日(周二) 下午2:00(GMT+8)",
      "i18n_content": {
        "en_us": "**Subject**\n<a href='https://open.feishu.cn'>卡片支持局部多语言-产研评审</a>\n12月26日(周二) 下午2:00(GMT+8)"
      }
    },
    {
      "tag": "img",
      "img_key": "img_v3_02ce_257576e4-7fce-4eab-9173-1db6655ab28g",
      "i18n_img_key": {
        "en_us": "img_v3_02ce_0980b834-4ad8-45ce-b953-40375e8c19fg"
      },
      "preview": true,
      "transparent": false,
      "scale_type": "fit_horizontal",
      "alt": {
        "tag": "plain_text",
        "content": ""
      }
    }
  ]
}
```
### Configure Multilingual globally
To set up multilingual globally in the card JSON code, you need to configure multilingual for both the card body and the card title. That is, you need to add language-specific complete card JSON code under the card's `i18n_elements` field and `header`'s `i18n` field.
#### Configure Multilingual for Card body

In the JSON structure of the Feishu card, you need to replace `elements` with `i18n_elements`, adding language-specific complete body card JSON under this field.

```json
"i18n_elements": {
  // Multilingual configuration for the body. You can configure a complete card for each language, and the card will automatically display the content in the language of the user's Feishu client.
  "en_us": [
    {}
  ], // English
  "zh_cn": [
    {}
  ], // Simplified Chinese
  "zh_hk": [
    {}
  ], // Traditional Chinese (Hong Kong)
  "zh_tw": [
    {}
  ], // Traditional Chinese (Taiwan)
  "ja_jp": [
    {}
  ], // Japanese
  "id_id": [
    {}
  ], // Indonesian
  "vi_vn": [
    {}
  ], // Vietnamese
  "th_th": [
    {}
  ], // Thai
  "pt_br": [
    {}
  ], // Portuguese
  "es_es": [
    {}
  ], // Spanish
  "ko_kr": [
    {}
  ], // Korean
  "de_de": [
    {}
  ], // German
  "fr_fr": [
    {}
  ], // French
  "it_it": [
    {}
  ], // Italian
  "ru_ru": [
    {}
  ], // Russian
  "ms_my": [
    {}
  ] // Malay
}
```

#### Configure Multilingual for Card title

If a title component is added to the card, you need to also configure the multilingual attributes for the title, meaning in the `header` field, you should add corresponding multilingual properties for the card title, subtitle, and title suffix label fields. For details on the JSON parameters of the title component, refer to [Title Component](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/feishu-cards/card-components/content-components/title).

```json
{
  "header": {
    "template": "blue",
    "title": {
      "tag": "plain_text",
      "content": "Example Title",
      "i18n": {
        // Multilingual configuration for the main title. You must configure either the content or i18n attribute. If both are configured, only i18n will be effective.
        "zh_cn": "", // Simplified Chinese
        "en_us": "", // English
        "zh_hk": "", // Traditional Chinese (Hong Kong)
        "zh_tw": "", // Traditional Chinese (Taiwan)
        "ja_jp": "", // Japanese
        "id_id": "", // Indonesian
        "vi_vn": "", // Vietnamese
        "th_th": "", // Thai
        "pt_br": "", // Portuguese
        "es_es": "", // Spanish
        "ko_kr": "", // Korean
        "de_de": "", // German
        "fr_fr": "", // French
        "it_it": "", // Italian
        "ru_ru": "", // Russian
        "ms_my": "" // Malay
      }
    },
    "subtitle": {
      "tag": "plain_text",
      "content": "Example Text",
      "i18n": {
        // Multilingual configuration for the subtitle. You must configure either the content or i18n attribute. If both are configured, only i18n will be effective.
        "zh_cn": "", // Simplified Chinese
        "en_us": "", // English
        "zh_hk": "", // Traditional Chinese (Hong Kong)
        "zh_tw": "", // Traditional Chinese (Taiwan)
        "ja_jp": "", // Japanese
        "id_id": "", // Indonesian
        "vi_vn": "", // Vietnamese
        "th_th": "", // Thai
        "pt_br": "", // Portuguese
        "es_es": "", // Spanish
        "ko_kr": "", // Korean
        "de_de": "", // German
        "fr_fr": "", // French
        "it_it": "", // Italian
        "ru_ru": "", // Russian
        "ms_my": "" // Malay
      }
    },
    "text_tag_list": [
      {
        "tag": "text_tag",
        "text": {
          // Label content
          "tag": "plain_text",
          "content": "Tag 1"
        },
        "color": "neutral"
      }
    ],
    "i18n_text_tag_list": {
      // Multilingual configuration for title suffix tags. A maximum of 3 tags can be set per language environment; excess will not be displayed. If both are configured, only i18n_text_tag_list will be effective.
      "zh_cn": [
        {}
      ], // Simplified Chinese
      "en_us": [
        {}
      ], // English
      "zh_hk": [
        {}
      ], // Traditional Chinese (Hong Kong)
      "zh_tw": [
        {}
      ], // Traditional Chinese (Taiwan)
      "ja_jp": [
        {}
      ], // Japanese
      "id_id": [
        {}
      ], // Indonesian
      "vi_vn": [
        {}
      ], // Vietnamese
      "th_th": [
        {}
      ], // Thai
      "pt_br": [
        {}
      ], // Portuguese
      "es_es": [
        {}
      ], // Spanish
      "ko_kr": [
        {}
      ], // Korean
      "de_de": [
        {}
      ], // German
      "fr_fr": [
        {}
      ], // French
      "it_it": [
        {}
      ], // Italian
      "ru_ru": [
        {}
      ], // Russian
      "ms_my": [
        {}
      ] // Malay
    }
  }
}
```

#### Card JSON Example

Below is an example of a multilingual card JSON code configured for both Chinese and English Feishu clients.
```json
{
  "header": {
    "template": "blue",
    "title": {
      "tag": "plain_text",
      "i18n": {
        "en_us": "English template",
        "ja_jp": "Japanese template",
        "zh_hk": "Traditional Chinese (Hong Kong)",
        "zh_tw": "Traditional Chinese (Taiwan)",
        "zh_cn": "Simplified Chinese template"
      }
    }
  },
  "i18n_elements": {
    "en_us": [
      {
        "tag": "markdown",
        "content": "English template"
      }
    ],
    "ja_jp": [
      {
        "tag": "markdown",
        "content": "Japanese template"
      }
    ],
    "zh_hk": [
      {
        "tag": "markdown",
        "content": "Traditional Chinese (Hong Kong)"
      }
    ],
    "zh_tw": [
      {
        "tag": "markdown",
        "content": "Traditional Chinese (Taiwan)"
      }
    ],
    "zh_cn": [
      {
        "tag": "markdown",
        "content": "Simplified Chinese template"
      }
    ]
  }
}
```
