Internationalization
August 13, 2026 · View on GitHub
Oh My DSH currently ships en and zh-CN messages.
Locale selection
Command-line tools resolve the locale in this order:
--locale <tag>or--locale=<tag>LC_ALLLC_MESSAGESLANG- English
Locale values may use POSIX suffixes, such as zh_CN.UTF-8. Unsupported
environment locales fall back to English. An unsupported explicit --locale
is reported as an error instead of being silently ignored.
Traditional Chinese locales are not mapped to Simplified Chinese. Until a
zh-TW catalog exists, zh-TW, zh-HK, and zh-Hant fall back to English.
Fallback
English is the source locale. A missing localized key falls back to the English message. Tests require every shipped locale to contain the complete English key set, so fallback is defensive rather than the normal translation workflow.
Adding a locale
- Add the locale tag to
SUPPORTED_LOCALES. - Add
locales/<tag>.jsonwith exactly the same keys and placeholders aslocales/en.json. - Add translated documentation under
docs/<tag>/when applicable. - Run
npm run public:check.
Message interpolation only replaces named placeholders such as {path}. It
does not evaluate templates, HTML, JavaScript, or shell syntax. Control
characters in interpolated values are escaped before terminal output.
Manifest fields and CLI messages are separate localization surfaces. A v1
production manifest must provide both en and zh-CN for name and
summary; additional valid locale tags can be added without changing the
Schema.