import { type MessageKey } from './locales/en.js'; export type Locale = 'en' | 'zh'; /** Coerce an arbitrary string (env/config/user input) to a supported Locale, defaulting to 'en'. */ export declare function normalizeLocale(raw: string | undefined | null): Locale; /** * Best-effort detection of the operator's system language from POSIX locale env vars. * Precedence follows POSIX: LC_ALL > LC_MESSAGES > LANG > LANGUAGE. A value whose language * tag starts with "zh" (zh_CN, zh_TW, zh-Hans, ...) maps to 'zh'; everything else (incl. unset, * "C", "POSIX") falls back to 'en'. Used by `cortex init` to pre-select the language option. */ export declare function detectSystemLocale(env?: NodeJS.ProcessEnv): Locale; export declare function setLocale(loc: Locale): void; export declare function getLocale(): Locale; /** * Translate a message key in the active locale. Resolution order: * active-locale table → en table (fallback) → the raw key (last resort). * `${param}` placeholders are substituted from `params`. */ export declare function t(key: MessageKey | string, params?: Record): string;