UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

25 lines (24 loc) 852 B
import { I18nService } from '@alauda/ui'; import { Translation } from './types'; export interface I18nAssetsLoadOptions { modules?: string[]; files?: Array<{ name: string; path: string; scope?: string; }>; } export declare class I18nAssetsLoader { private readonly options; private readonly assetsStore; constructor(options: I18nAssetsLoadOptions); loadI18n(language: string): Promise<Translation>; getLoadedLanguages(): string[]; languageIsLoaded(language: string): boolean; getLoadedI18n(): { [language: string]: Translation; }; private fetchI18nFile; } export declare function triggerAllI18nLoader(loaders: I18nAssetsLoader[]): Promise<Translation[]>; export declare function setAuiTranslation(i18nService: I18nService, loader: I18nAssetsLoader, locale: string): void;