1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export declare class MultiString {
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 | constructor(map?: any);
|
25 | /**
|
26 | * Gets a string translation by specified language.
|
27 | * When language is not found it defaults to English ('en').
|
28 | * When English is not found it takes the first value.
|
29 | *
|
30 | * @param language a language two-symbol code.
|
31 | * @returns a translation for the specified language or default translation.
|
32 | */
|
33 | get(language: string): string;
|
34 | /**
|
35 | * Gets all languages stored in this MultiString object,
|
36 | *
|
37 | * @returns a list with language codes.
|
38 | */
|
39 | getLanguages(): string[];
|
40 | /**
|
41 | * Puts a new translation for the specified language.
|
42 | *
|
43 | * @param language a language two-symbol code.
|
44 | * @param value a new translation for the specified language.
|
45 | */
|
46 | put(language: string, value: any): any;
|
47 | /**
|
48 | * Removes translation for the specified language.
|
49 | *
|
50 | * @param language a language two-symbol code.
|
51 | */
|
52 | remove(language: string): void;
|
53 | /**
|
54 | * Appends a map with language-translation pairs.
|
55 | *
|
56 | * @param map the map with language-translation pairs.
|
57 | */
|
58 | append(map: any): void;
|
59 | /**
|
60 | * Clears all translations from this MultiString object.
|
61 | */
|
62 | clear(): any;
|
63 | /**
|
64 | * Returns the number of translations stored in this MultiString object.
|
65 | *
|
66 | * @returns the number of translations.
|
67 | */
|
68 | length(): number;
|
69 | /**
|
70 | * Creates a new MultiString object from a value that contains language-translation pairs.
|
71 | *
|
72 | * @param value the value to initialize MultiString.
|
73 | * @returns a MultiString object.
|
74 | *
|
75 | * @see [[StringValueMap]]
|
76 | */
|
77 | static fromValue(value: any): MultiString;
|
78 | /**
|
79 | * Creates a new MultiString object from language-translation pairs (tuples).
|
80 | *
|
81 | * @param tuples an array that contains language-translation tuples.
|
82 | * @returns a MultiString Object.
|
83 | *
|
84 | * @see [[fromTuplesArray]]
|
85 | */
|
86 | static fromTuples(...tuples: any[]): MultiString;
|
87 | /**
|
88 | * Creates a new MultiString object from language-translation pairs (tuples) specified as array.
|
89 | *
|
90 | * @param tuples an array that contains language-translation tuples.
|
91 | * @returns a MultiString Object.
|
92 | */
|
93 | static fromTuplesArray(tuples: any[]): MultiString;
|
94 | }
|