UNPKG

@toife/vue-i18n

Version:

Plugins locale messages for Vue

23 lines (22 loc) 956 B
/** --------------------------------------------------- */ /** Set a new base URL template if needed */ declare function addLocaleModule(template: any): void; /** Set current locale (async loads if needed) */ declare function setLocale(newLocale: string): Promise<void>; declare function setFallbackLocale(l: string): void; /** Get current locale string */ declare function getLocale(): string; declare function addMessage(name: string, msgs: any): Promise<void>; /** Core translate function */ export declare function useTranslator(name: string): (key: string, params?: {}) => any; /** Composable for Vue components */ export declare function useI18n(): { locale: import('vue').Ref<string, string>; isLocaleLoaded: (name: string) => any; setFallbackLocale: typeof setFallbackLocale; setLocale: typeof setLocale; addLocaleModule: typeof addLocaleModule; addMessage: typeof addMessage; getLocale: typeof getLocale; }; export {};