UNPKG

angular-l10n

Version:

An Angular library to translate messages, dates and numbers

28 lines (27 loc) 1.09 kB
import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Caching } from '../models/caching'; import { L10nConfigRef } from "../models/l10n-config"; /** * Implement this class-interface to create a custom provider for translation data. */ export declare abstract class TranslationProvider { /** * This method must contain the logic of data access. * @param language The current language * @param args The object set during the configuration of 'providers' * @return An observable of an object of translation data: {key: value} */ abstract getTranslation(language: string, args: any): Observable<any>; } export declare class L10nTranslationProvider implements TranslationProvider { private http; private configuration; private caching; private headers; private options; constructor(http: HttpClient, configuration: L10nConfigRef, caching: Caching); getTranslation(language: string, args: any): Observable<any>; private setOptions; private getRequest; }