Skip to content

feat(core): add internationalization (i18n) support for console messages#197

Open
Jah-yee wants to merge 1 commit intoalibaba:mainfrom
Jah-yee:main
Open

feat(core): add internationalization (i18n) support for console messages#197
Jah-yee wants to merge 1 commit intoalibaba:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 10, 2026

Summary

This PR adds internationalization (i18n) support to PageAgent, addressing feature request #195.

Changes

  • Added i18n.ts module with translations for English and Chinese
  • Updated PageAgentCore to use translator for all user-facing strings
  • Support language config via AgentConfig.language (en-US/zh-CN)
  • Translated console messages, observations, and error messages

Usage

import { PageAgent } from "@page-agent/core";

const agent = new PageAgent({
  language: "zh-CN", // or "en-US"
  // ...other config
});

With language: "zh-CN", console output will be in Chinese:

  • 👀 观察中...
  • 🧠 思考中...
  • 任务完成

Related Issue

Closes #195

- Add i18n.ts module with translations for English and Chinese
- Update PageAgentCore to use translator for all user-facing strings
- Support language config via AgentConfig.language (en-US/zh-CN)
- Translate console messages, observations, and error messages

Addresses issue alibaba#195
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


OpenClaw Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Internationalization (i18n) and Multi-language Support

2 participants