import { LibraryConfig } from '../interfaces/library-config.interface'; import { CookieService } from 'ngx-cookie'; export declare class TranslationsService { private cookies; private config; /** * The current selected language. * @type {string} */ private language; /** * The dictionary containing the translations. * @type {object} */ private dictionary; /** * Default constructor. * * @param {CookieService} cookies The cookies service. * @param {LibraryConfig} config The library config data. */ constructor(cookies: CookieService, config: LibraryConfig); /** * Set the current language to a new value. * * @param {string} language The new language. */ use(language: string): void; /** * Translates a key. * * @param {string} key The key to translate. * * @returns {string} The translated key. */ instant(key: string): string; /** * Verifies if the language was supported. * * @param {string} language The supplied language. * * @returns {string} The validated language. */ private verify(language); /** * Translates a key to the current language equivalent. * * @param {string} key The key to translate. * * @returns {string} The translated key. */ private translate(key); /** * @returns {boolean} The validity of the dictionary files. */ private valid(); /** * Retrieve the keys of an object in a string array format. * * @param {object} object The object containing the data. * @param {string} id The current identifier for the data. * * @returns {string[]} A string array containing the keys. */ private getKeys(object, id?); /** * Compares two string arrays. * * @param {string[]} first The first string array. * @param {string[]} second The second string array. * * @returns {boolean} True if the arrays are equal, else false. */ private compare(first, second); }