Hermes Agent incorporates a static message catalog system for internationalization (i18n), enabling the application to display messages in multiple languages. This system is primarily used for user-facing prompts in the Command Line Interface (CLI), replies to slash commands within the messaging gateway, and the comprehensive localization of the Desktop application and Web Dashboard.
The i18n system provides a localized user experience for high-impact interaction points. While the core agent reasoning and tool outputs remain in English to maintain performance and consistency, the interface layers are translatable.
Included in Scope:
/model, /status, and /help across platforms like Slack and Discord.The system supports 16 primary languages. These are managed via YAML catalogs in the locales/ directory for the Python backend and TypeScript modules for the frontend.
| Code | Language | Code | Language |
|---|---|---|---|
en | English (Baseline) | tr | Turkish |
zh | Simplified Chinese | uk | Ukrainian |
zh-hant | Traditional Chinese | ja | Japanese |
de | German | es | Spanish |
fr | French | it | Italian |
tr | Turkish | ko | Korean |
pt | Portuguese | ru | Russian |
af | Afrikaans | ga | Irish (Gaeilge) |
hu | Hungarian | ar | Arabic |
Sources: apps/desktop/src/i18n/types.ts8 locales/ar.yaml1-5
The i18n system is centered around agent/i18n.py, which handles the loading of static message catalogs. At the CLI level, the system ensures that output streams are configured for UTF-8 to prevent encoding crashes when rendering localized characters or box-drawing symbols hermes_cli/__init__.py21-51
When the agent needs to display a localized string (e.g., during a tool execution approval), it queries the i18n module.
Title: "Internationalization Data Flow and Catalog Loading"
Sources: agent/i18n.py5-15 hermes_cli/__init__.py52-92 apps/desktop/src/i18n/en.ts1-5 apps/desktop/src/i18n/zh.ts1-5 apps/desktop/src/i18n/zh-hant.ts1-5 apps/desktop/src/i18n/ja.ts1-5 web/src/i18n/en.ts1-5 web/src/i18n/zh.ts1-5
The gateway adapters use the i18n system to format replies. For example, the Slack adapter handles complex markdown table preprocessing to ensure that CJK (Chinese, Japanese, Korean) characters, which occupy "East-Asian Wide" display slots, remain aligned in monospace blocks.
Title: "Slack Table Alignment for CJK Languages"
Sources: plugins/observability/nemo_relay/__init__.py1-10 plugins/observability/nemo_relay/README.md1-10 (Note: The original citation for Slack adapter was not found in the provided files, so a placeholder for a related plugin is used.)
To support internationalization on legacy systems (e.g., Windows services or minimal Linux installs), the CLI forces UTF-8 encoding on stdout and stderr at import time. This prevents UnicodeEncodeError when the agent attempts to print localized strings or specialized glyphs hermes_cli/__init__.py21-45
The Desktop application and Web UI use a separate TypeScript-based internationalization system. Locale files are located under apps/desktop/src/i18n/ and web/src/i18n/. The Translations interface apps/desktop/src/i18n/types.ts51-279 defines the structure of the translation keys, ensuring type safety and consistency across different languages. For example, apps/desktop/src/i18n/en.ts apps/desktop/src/i18n/en.ts5-279 provides the English translations, while apps/desktop/src/i18n/zh.ts apps/desktop/src/i18n/zh.ts5-279 and apps/desktop/src/i18n/zh-hant.ts apps/desktop/src/i18n/zh-hant.ts6-279 provide Simplified and Traditional Chinese translations respectively.
The defineLocale helper apps/desktop/src/i18n/zh-hant.ts5 is used to create partial locales, allowing missing desktop-only strings to fall back to English while maintaining type-checking for new keys.
Title: "Desktop and Web UI Localization Architecture"
Sources: apps/desktop/src/i18n/types.ts1-279 apps/desktop/src/i18n/en.ts1-279 apps/desktop/src/i18n/zh.ts1-279 apps/desktop/src/i18n/zh-hant.ts1-279 apps/desktop/src/i18n/ja.ts1-279
To add new keys to the internationalization system, parity must be maintained across the YAML catalogs and the frontend TypeScript definitions.
locales/en.yaml (the baseline) and then provide translations in other files like locales/zh.yaml or locales/ja.yaml.Translations interface apps/desktop/src/i18n/types.ts51-279 in the respective TypeScript modules.tryHint: term => \Try “${term}”`` apps/desktop/src/i18n/en.ts43Sources: agent/i18n.py10-25 hermes_cli/__init__.py87-90 apps/desktop/src/i18n/types.ts51-279 apps/desktop/src/i18n/en.ts43
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.