import { ITranslateConfig, Key, LangChangedEvent, LangChangedSubscription, LanguageIdentifier, Strings, Translation, Values, ValuesCallback } from "./model"; /** * Default configuration object. */ export declare const defaultTranslateConfig: (() => ITranslateConfig); export declare let translateConfig: ITranslateConfig; /** * Registers a translation config. * @param config */ export declare function registerTranslateConfig(config: Partial): ITranslateConfig; /** * Dispatches a language changed event. * @param detail */ export declare function dispatchLangChanged(detail: LangChangedEvent): void; /** * Updates the configuration object with a new language and strings. * Then dispatches that the language has changed. * @param newLang * @param newStrings * @param config */ export declare function updateLang(newLang: LanguageIdentifier, newStrings: Strings, config?: ITranslateConfig): void; /** * Listens for changes in the language. * Returns a method for unsubscribing from the event. * @param callback * @param options */ export declare function listenForLangChanged(callback: (e: LangChangedEvent) => void, options?: AddEventListenerOptions): LangChangedSubscription; /** * Sets a new current language and dispatches a global language changed event. * @param lang * @param config */ export declare function use(lang: LanguageIdentifier, config?: ITranslateConfig): Promise; /** * Translates a key and interpolates if values are defined. * Uses the current strings and translation cache to fetch the translation. * @param key (eg. "common.get_started") * @param values (eg. { count: 42 }) * @param config */ export declare function get(key: Key, values?: Values | ValuesCallback | null, config?: ITranslateConfig): Translation;