i18n.d.ts 547 B

12345678910111213141516
  1. import { i18nMap } from './i18nMap';
  2. import { KeyParams } from './KeyParams';
  3. declare class i18nLoader {
  4. private static instance;
  5. private readonly map;
  6. private locale;
  7. static defaultLocale: string;
  8. constructor(locale: string);
  9. static getInstance(locale?: string): i18nLoader;
  10. setLocale(locale: string): i18nLoader;
  11. load(...paths: string[]): i18nLoader;
  12. loadJson(obj: i18nMap): i18nLoader;
  13. get(key: string): string;
  14. }
  15. declare const $$: (key: string, params?: KeyParams) => string;
  16. export { i18nLoader, $$ };