feat: add modular i18n foundation
This commit is contained in:
9
src/i18n/types.ts
Normal file
9
src/i18n/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export const supportedLocales = ["zh-CN", "en-US", "th-TH"] as const;
|
||||
|
||||
export type SupportedLocale = (typeof supportedLocales)[number];
|
||||
|
||||
export const defaultLocale: SupportedLocale = "zh-CN";
|
||||
|
||||
export type LocaleMessageSchema<T> = {
|
||||
readonly [Key in keyof T]: T[Key] extends string ? string : LocaleMessageSchema<T[Key]>;
|
||||
};
|
||||
Reference in New Issue
Block a user