First translation step

This commit is contained in:
Lorenzo
2025-06-25 20:09:29 +02:00
parent f1a25b21a6
commit 3ab99647aa
90 changed files with 2827 additions and 2378 deletions
@@ -0,0 +1,23 @@
export type SupportedLanguagesType = "en-US" | "zh-CN";
export type ImportLocaleFn = () => Promise<{ default: Record<string, string> }>;
export type LoadMessageFn = (lang: SupportedLanguagesType) => Promise<Record<string, string> | undefined>;
export interface LocaleSetupOptions {
/**
* Default language
* @default zh-CN
*/
defaultLocale?: SupportedLanguagesType;
/**
* Load message function
* @param lang
* @returns
*/
loadMessages?: LoadMessageFn;
/**
* Whether to warn when the key is not found
*/
missingWarn?: boolean;
}