Skip to content

feat: add an option to switch to english language#119

Open
Pratiyankkumar wants to merge 3 commits into666ghj:mainfrom
Pratiyankkumar:language-option
Open

feat: add an option to switch to english language#119
Pratiyankkumar wants to merge 3 commits into666ghj:mainfrom
Pratiyankkumar:language-option

Conversation

@Pratiyankkumar
Copy link

Right now the content of the website is mostly in Chinese , Added an button to switch between Chinese and english language .

Demo Video

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Mar 10, 2026
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 10, 2026
@Pratiyankkumar
Copy link
Author

Screenshot 2026-03-10 at 11 42 33 PM

PR summary (last two prompts):

  1. Error message i18n – Added errors in zh.js / en.js and switched key error messages in Step2, Step3, Step5, and Process.vue to $t() so errors follow the selected language.

  2. Backend locale for LLM – Backend uses X-Locale from the frontend to pick the report language. When English is selected, the LLM uses English; when Chinese, it uses Chinese.

  3. Report Agent chat language – Report chat API reads locale and passes report_language to ReportAgent. The chat system prompt now includes a language instruction so responses match the user’s language.

  4. Localized API error responses – Introduced error_messages.py and updated the report chat API so error messages are returned in the user’s language instead of hardcoded Chinese.

@Pratiyankkumar
Copy link
Author

@hzr1937 please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant