admin-vben/packages/locales/src/typing.ts

20 lines
505 B
TypeScript
Raw Normal View History

2024-06-02 12:47:50 +00:00
import type { SupportedLanguagesType } from '@vben-core/typings';
2024-05-19 13:20:42 +00:00
type ImportLocaleFn = () => Promise<{ default: Record<string, string> }>;
interface LocaleSetupOptions {
/**
* Default language
* @default zh-CN
*/
2024-06-02 12:47:50 +00:00
defaultLocale?: SupportedLanguagesType;
/**
* Load third-party library messages
* @param lang
* @returns
*/
loadThirdPartyMessage?: (lang: SupportedLanguagesType) => Promise<void>;
2024-05-19 13:20:42 +00:00
}
2024-06-02 12:47:50 +00:00
export type { ImportLocaleFn, LocaleSetupOptions, SupportedLanguagesType };