How to change all dify templates to Chinese #7448

Closed
opened 2026-02-21 18:20:38 -05:00 by yindo · 6 comments
Owner

Originally created by @kunlun122 on GitHub (Dec 30, 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.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I have read #8250. and I have change the language to Chinese ,but the description of template is still english, .
image
image

✔️ Expected Behavior

I hope the template description can change according to the language settings

Actual Behavior

the description of template is still english,

Originally created by @kunlun122 on GitHub (Dec 30, 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.14.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce **I have read #8250**. and I have change the language to Chinese ,but the description of template is still english, . ![image](https://github.com/user-attachments/assets/3bc37f4c-0da5-4dba-8f4f-529a5c13af64) ![image](https://github.com/user-attachments/assets/88734b44-f697-4b10-90e0-2e569167576f) ### ✔️ Expected Behavior I hope the template description can change according to the language settings ### ❌ Actual Behavior the description of template is still english,
yindo added the 🙋‍♂️ question label 2026-02-21 18:20:38 -05:00
yindo closed this issue 2026-02-21 18:20:38 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 30, 2024):

I found a similar closed issue that might help you resolve the problem. The suggested solution is to ensure that the language codes for Chinese are included in the web/i18n/languages.json file and to set the default language in the config/index.ts file of your WebApp template. Here is a brief overview of the steps:

  1. Update web/i18n/languages.json: Make sure the language codes for Chinese ("zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese) are included.

  2. Configure Default Language in config/index.ts: Set the default_language to "zh-Hans" or "zh-Hant" in your application settings.

This should help change all templates to Chinese [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 30, 2024): <!-- Answer --> I found a similar closed issue that might help you resolve the problem. The suggested solution is to ensure that the language codes for Chinese are included in the `web/i18n/languages.json` file and to set the default language in the `config/index.ts` file of your WebApp template. Here is a brief overview of the steps: 1. **Update `web/i18n/languages.json`**: Make sure the language codes for Chinese ("zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese) are included. 2. **Configure Default Language in `config/index.ts`**: Set the `default_language` to "zh-Hans" or "zh-Hant" in your application settings. This should help change all templates to Chinese <sup>[[1]](https://github.com/langgenius/dify/issues/8250)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/8243)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=other)</sup>
Author
Owner

@kunlun122 commented on GitHub (Dec 30, 2024):

I found a similar closed issue that might help you resolve the problem. The suggested solution is to ensure that the language codes for Chinese are included in the web/i18n/languages.json file and to set the default language in the config/index.ts file of your WebApp template. Here is a brief overview of the steps:

  1. Update web/i18n/languages.json: Make sure the language codes for Chinese ("zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese) are included.
  2. Configure Default Language in config/index.ts: Set the default_language to "zh-Hans" or "zh-Hant" in your application settings.

This should help change all templates to Chinese [1][2].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

I cann't find such files under Docker environment

@kunlun122 commented on GitHub (Dec 30, 2024): > I found a similar closed issue that might help you resolve the problem. The suggested solution is to ensure that the language codes for Chinese are included in the `web/i18n/languages.json` file and to set the default language in the `config/index.ts` file of your WebApp template. Here is a brief overview of the steps: > > 1. **Update `web/i18n/languages.json`**: Make sure the language codes for Chinese ("zh-Hans" for Simplified Chinese or "zh-Hant" for Traditional Chinese) are included. > 2. **Configure Default Language in `config/index.ts`**: Set the `default_language` to "zh-Hans" or "zh-Hant" in your application settings. > > This should help change all templates to Chinese [[1]](https://github.com/langgenius/dify/issues/8250)[[2]](https://github.com/langgenius/dify/issues/8243). > > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/e3122b98-6566-407d-b400-b385382e2d66?feedback_type=other) I cann't find such files under Docker environment
Author
Owner

@dosubot[bot] commented on GitHub (Dec 30, 2024):

In a Docker environment, the files you need to modify might be inside the Docker containers. To access and modify these files, you can follow these steps:

  1. Access the Running Container: Use the following command to access the shell of the running container where the web application is hosted. Replace your_container_name with the actual name of your container.

    docker exec -it your_container_name /bin/sh
    
  2. Locate the Files: Once inside the container, navigate to the directory where the application files are located. This is typically under /app or a similar directory, depending on how the Docker image is structured.

  3. Modify the Files:

    • languages.json: Locate and edit the languages.json file to ensure the Chinese language codes are included.
    • config/index.ts: Modify the config/index.ts file to set the default_language to "zh-Hans" or "zh-Hant".
  4. Restart the Container: After making the changes, exit the container and restart it to apply the changes:

    docker restart your_container_name
    

These steps should help you modify the necessary files to change the templates to Chinese in a Docker environment.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 30, 2024): <!-- Answer --> In a Docker environment, the files you need to modify might be inside the Docker containers. To access and modify these files, you can follow these steps: 1. **Access the Running Container**: Use the following command to access the shell of the running container where the web application is hosted. Replace `your_container_name` with the actual name of your container. ```bash docker exec -it your_container_name /bin/sh ``` 2. **Locate the Files**: Once inside the container, navigate to the directory where the application files are located. This is typically under `/app` or a similar directory, depending on how the Docker image is structured. 3. **Modify the Files**: - **`languages.json`**: Locate and edit the `languages.json` file to ensure the Chinese language codes are included. - **`config/index.ts`**: Modify the `config/index.ts` file to set the `default_language` to "zh-Hans" or "zh-Hant". 4. **Restart the Container**: After making the changes, exit the container and restart it to apply the changes: ```bash docker restart your_container_name ``` These steps should help you modify the necessary files to change the templates to Chinese in a Docker environment. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/90a0d40e-276e-40c2-81e3-666ccadfb08b?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Dec 30, 2024):

You just need to switch to English and switch it back to Chinese.

@crazywoola commented on GitHub (Dec 30, 2024): You just need to switch to English and switch it back to Chinese.
Author
Owner

@kunlun122 commented on GitHub (Dec 30, 2024):

@crazywoola I tried, but it does not work for me.

1.change to English
image
image

2.change back to Chinese,but the description of template is still english
image
image

@kunlun122 commented on GitHub (Dec 30, 2024): @crazywoola I tried, but it does not work for me. 1.change to English ![image](https://github.com/user-attachments/assets/409fb7a8-af67-4c82-a89f-49d676d299ce) ![image](https://github.com/user-attachments/assets/c5de8aeb-fb94-42b6-b41b-c3f1ce63935b) 2.change back to Chinese,but the description of template is still english ![image](https://github.com/user-attachments/assets/e2e98477-ae18-4a4b-a465-cbf600864cda) ![image](https://github.com/user-attachments/assets/8398f06d-183d-467c-885f-b1f93b613f75)
Author
Owner

@kunlun122 commented on GitHub (Dec 31, 2024):

I have just solved this problem. I checked the log of the API container and found that the API container tries to access tmpl.dify.ai to get templates. However, my server cannot access the Internet. I have set up a proxy for the container, and all templates changed to Chinese.
081SO}KJ$B66{H19EF`Z5CN

image

I hope the official team can pre-configure Chinese templates.

@kunlun122 commented on GitHub (Dec 31, 2024): I have just solved this problem. I checked the log of the API container and found that the API container tries to access tmpl.dify.ai to get templates. However, my server cannot access the Internet. I have set up a proxy for the container, and all templates changed to Chinese. ![081SO}KJ$B66{H19EF`Z5CN](https://github.com/user-attachments/assets/29f2ec0c-6bed-42f5-b2a5-1bc2f451888a) ![image](https://github.com/user-attachments/assets/73127687-e64d-40fd-9433-4433359f2b4f) **I hope the official team can pre-configure Chinese templates.**
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7448