How to change all dify templates to Chinese #5534

Closed
opened 2026-02-21 18:11:29 -05:00 by yindo · 2 comments
Owner

Originally created by @lizhanyang505 on GitHub (Sep 10, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

How to change all dify templates to Chinese?
image
image

✔️ Expected Behavior

plase help me how to config

Actual Behavior

No response

Originally created by @lizhanyang505 on GitHub (Sep 10, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.3 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce How to change all dify templates to Chinese? ![image](https://github.com/user-attachments/assets/0711f719-54df-4fb7-bf27-b0d59632944b) ![image](https://github.com/user-attachments/assets/3ac494d1-2c9d-4f09-85b6-2c3dd9132e9e) ### ✔️ Expected Behavior plase help me how to config ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 18:11:29 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 10, 2024):

To change all Dify templates to Chinese, you need to set the language to either "zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese. Here is how you can do it:

  1. Update web/i18n/languages.json:
    Ensure that the language codes for Chinese are included in the web/i18n/languages.json file. Here is the relevant part of the file:

    {
      "languages": [
        {
          "value": "zh-Hans",
          "name": "简体中文",
          "prompt_name": "Chinese Simplified",
          "example": "你好,Dify!",
          "supported": true
        },
        {
          "value": "zh-Hant",
          "name": "繁體中文",
          "prompt_name": "Chinese Traditional",
          "example": "你好,Dify!",
          "supported": true
        }
      ]
    }
    
  2. Configure Default Language in config/index.ts:
    Set the default language in the config/index.ts file of your WebApp template. Here is an example configuration:

    export const APP_INFO: AppInfo = {
      "title": 'Chat APP',
      "description": '',
      "copyright": '',
      "privacy_policy": '',
      "default_language": 'zh-Hans'
    }
    

By setting the default_language to "zh-Hans" or "zh-Hant" in your application settings, you can change all templates to Chinese [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Answer --> To change all Dify templates to Chinese, you need to set the language to either "zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese. Here is how you can do it: 1. **Update `web/i18n/languages.json`**: Ensure that the language codes for Chinese are included in the `web/i18n/languages.json` file. Here is the relevant part of the file: ```json { "languages": [ { "value": "zh-Hans", "name": "简体中文", "prompt_name": "Chinese Simplified", "example": "你好,Dify!", "supported": true }, { "value": "zh-Hant", "name": "繁體中文", "prompt_name": "Chinese Traditional", "example": "你好,Dify!", "supported": true } ] } ``` 2. **Configure Default Language in `config/index.ts`**: Set the default language in the `config/index.ts` file of your WebApp template. Here is an example configuration: ```javascript export const APP_INFO: AppInfo = { "title": 'Chat APP', "description": '', "copyright": '', "privacy_policy": '', "default_language": 'zh-Hans' } ``` By setting the `default_language` to "zh-Hans" or "zh-Hant" in your application settings, you can change all templates to Chinese <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/i18n/languages.json)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/features/ai-plugins/based-on-frontend-templates.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 10, 2024):

image
@crazywoola commented on GitHub (Sep 10, 2024): <img width="1067" alt="image" src="https://github.com/user-attachments/assets/0aac4ee8-6a74-44a8-80b8-32d573b9693a">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5534