Skip to content

ADR-0002 — i18n via env var from day one

Status: accepted Date: 2026-05-31

Context

CLI output strings need to be consistent and localizable. The suite is open-source and may be used in both English and French contexts.

Decision

All CLI-facing strings are defined as keyed templates in i18n/en.py and i18n/fr.py. Locale is resolved in order: locale argument → SNOWFLAKE_TOOLS_LOCALE env var → en. Unsupported locales fall back silently to en. Missing keys return the key itself — no crash.

t = get_translator()          # uses env var or "en"
t = get_translator("fr")      # force French
print(t("export.done", path="/tmp/out.xlsx"))

Consequences

Zero hardcoded output strings in command implementations. Adding a new locale = adding one file in i18n/. Applies to all commands, not just pinky export.