Chinese Localization for Hermes Agent CLI
Background
Hermes Agent has a growing user base in China and other Chinese-speaking regions. Many users (including myself) would benefit from having the CLI interface localized to Chinese, especially for:
- Compression feedback messages
- Session token usage display
- Voice mode status
- Approval prompts and choices
- Timeout warnings
- MCP server reload messages
Proposed Solution
I've implemented a lightweight i18n solution in my fork: https://github.com/gzsiang/hermes-agent
Key Features
-
Configurable language switching via approvals.language in ~/.hermes/config.yaml:
approvals:
language: zh # or 'en' for English
-
Zero breaking changes - defaults to English when no language is set
-
Minimal code changes:
- Added
tools/i18n.py (~250 lines) with format_zh() function
- Wrapped user-facing strings in
cli.py with format_zh() calls
- No external dependencies (pure Python)
-
Easy to extend - translation dictionary can be expanded for more strings or additional languages
Example Usage
# Before
print("🗜️ Compressing {count} messages...")
# After
print(f"🗜️ {format_zh('Compressing {count} messages', count=count)}...")
Output with language: zh:
Output with language: en (default):
🗜️ Compressing 10 messages...
Questions for the Maintainers
-
Is there an official i18n plan for Hermes Agent? If so, I'd love to align my implementation with it.
-
Would you be open to a PR for this lightweight i18n approach? I'm happy to:
- Improve code style to match the project
- Add unit tests
- Expand translations based on feedback
- Refactor if there's a preferred pattern
-
If not ready for i18n, I'll continue maintaining this in my fork for Chinese users. No pressure!
Notes
- Current implementation only covers high-frequency CLI strings (~20 locations)
- Translation quality could be improved with native speaker review
- The approach is designed to be non-intrusive and easy to remove if not adopted
Thanks for building such an amazing tool! 🙏
Chinese Localization for Hermes Agent CLI
Background
Hermes Agent has a growing user base in China and other Chinese-speaking regions. Many users (including myself) would benefit from having the CLI interface localized to Chinese, especially for:
Proposed Solution
I've implemented a lightweight i18n solution in my fork: https://github.com/gzsiang/hermes-agent
Key Features
Configurable language switching via
approvals.languagein~/.hermes/config.yaml:Zero breaking changes - defaults to English when no language is set
Minimal code changes:
tools/i18n.py(~250 lines) withformat_zh()functioncli.pywithformat_zh()callsEasy to extend - translation dictionary can be expanded for more strings or additional languages
Example Usage
Output with
language: zh:Output with
language: en(default):Questions for the Maintainers
Is there an official i18n plan for Hermes Agent? If so, I'd love to align my implementation with it.
Would you be open to a PR for this lightweight i18n approach? I'm happy to:
If not ready for i18n, I'll continue maintaining this in my fork for Chinese users. No pressure!
Notes
Thanks for building such an amazing tool! 🙏