UNPKG

787 BTypeScriptView Raw
1/**
2 * Init internationalization
3 *
4 * @param rootDir The path, where i18n directory is located
5 * @param languageOrAdapter The adapter instance or the language to use
6 */
7export declare function init(rootDir: string, languageOrAdapter: ioBroker.Adapter | ioBroker.Languages): Promise<void>;
8/**
9 * Get translation as one string
10 *
11 * @param key Word to translate
12 * @param args Optional parameters to replace %s
13 */
14export declare function translate(key: string, ...args: (string | number | boolean | null)[]): string;
15/**
16 * Get translation as ioBroker.Translated object
17 *
18 * @param key Word to translate
19 * @param args Optional parameters to replace %s
20 */
21export declare function getTranslatedObject(key: string, ...args: (string | number | boolean | null)[]): ioBroker.Translated;