Files
MyGoNavi/shared/i18n/locales.ts
tianqijiuyun-latiao 558966a129 feat(i18n): 推进六语言多语言体系与扫描门禁
- 新增共享六语言词典、前端 i18n 运行时与语言设置入口

- 推进连接、驱动、数据网格、查询、AI、Redis、表设计等模块文案本地化

- 补充 raw 边界、SQL/驱动/更新场景测试与 i18n 扫描工具
2026-06-15 14:35:08 +08:00

15 lines
487 B
TypeScript

export const DEFAULT_LANGUAGE = "zh-CN";
export const SUPPORTED_LANGUAGES = ["zh-CN", "en-US"] as const;
export type SupportedLanguage = (typeof SUPPORTED_LANGUAGES)[number];
export const isSupportedLanguage = (
value: unknown,
): value is SupportedLanguage =>
typeof value === "string" &&
(SUPPORTED_LANGUAGES as readonly string[]).includes(value);
export const resolveLanguage = (value: unknown): SupportedLanguage =>
isSupportedLanguage(value) ? value : DEFAULT_LANGUAGE;