Skip to content

Support i18n / localized output (Chinese, Japanese, German) #224

@tiulpin

Description

@tiulpin

Area

Other / Not sure (cross-cutting — affects all user-facing output)

Problem or use case

The CLI is English-only. Some users prefer localized human-prose output (errors, hints, help text, table headers, status messages).

This issue is intentionally a placeholder for upvotes / discussion. We do not plan to implement i18n unless there is clear demand. Most popular dev/cloud CLIs (gh, kubectl, docker, aws, gcloud, terraform, even Alibaba/Tencent/Huawei cloud CLIs) ship English-only, so the bar for taking this on is high.

If you want this, please react with 👍 on this issue and (optionally) leave a comment with:

  • Which language(s) matter to you
  • Whether you'd be willing to contribute / review translations

Proposed solution

If we proceed, the shape would roughly be:

Languages (initial scope, in priority order):

  1. English (source of truth)
  2. Chinese — Simplified (zh_CN)
  3. Japanese (ja)
  4. German (de)

Additional locales only if community contributors volunteer to maintain them.

Mechanics:

  • github.com/nicksnyder/go-i18n/v2 for message catalogs (TOML files under internal/i18n/)
  • Locale resolution: LC_MESSAGESLANG → fallback to English
  • English fallback is mandatory — missing keys never surface as raw IDs

Translate:

  • Error messages, hints, suggestions
  • Help text (long descriptions, flag usage)
  • Table column headers, status labels, prompts

Never translate:

  • Command names, flag names, subcommand names
  • JSON keys and values (machine-readable output stays stable)
  • Enum values returned by the API (SUCCESS, FAILURE, RUNNING, …)
  • Log levels, env var names, URLs
  • Anything that users grep or pipe in scripts/CI

Alternatives considered

  • Do nothing (current state) — matches every popular dev CLI; lowest maintenance cost.
  • Docs-only localization — translate docs/topics/ without touching CLI output. Lower risk, partially addresses the gap, doesn't break script compatibility.
  • More languages upfront (es, fr, ko…) — rejected for initial scope; translation churn on a fast-moving CLI tends to leave secondary locales stale.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions