1 | import { I18nConfig } from './types';
|
2 | /**
|
3 | * Export I18n APIs
|
4 | */
|
5 | export declare class I18n {
|
6 | /**
|
7 | * @static
|
8 | * @method
|
9 | * Configure I18n part
|
10 | * @param {Object} config - Configuration of the I18n
|
11 | */
|
12 | static configure(config: Record<string, any>): I18nConfig;
|
13 | static getModuleName(): string;
|
14 | /**
|
15 | * @static
|
16 | * @method
|
17 | * Create an instance of I18n for the library
|
18 | */
|
19 | static createInstance(): void;
|
20 | /**
|
21 | * @static @method
|
22 | * Explicitly setting language
|
23 | * @param {String} lang
|
24 | */
|
25 | static setLanguage(lang: string): void;
|
26 | /**
|
27 | * @static @method
|
28 | * Get value
|
29 | * @param {String} key
|
30 | * @param {String} defVal - Default value
|
31 | */
|
32 | static get(key: string, defVal?: string): any;
|
33 | /**
|
34 | * @static
|
35 | * @method
|
36 | * Add vocabularies for one language
|
37 | * @param {String} language - Language of the dictionary
|
38 | * @param {Object} vocabularies - Object that has key-value as dictionary entry
|
39 | */
|
40 | static putVocabulariesForLanguage(language: string, vocabularies: Record<string, string>): void;
|
41 | /**
|
42 | * @static
|
43 | * @method
|
44 | * Add vocabularies for one language
|
45 | * @param {Object} vocabularies - Object that has language as key,
|
46 | * vocabularies of each language as value
|
47 | */
|
48 | static putVocabularies(vocabularies: Record<string, Record<string, string>>): void;
|
49 | static checkConfig(): boolean;
|
50 | }
|