UNPKG

@singleton-i18n/angular-client

Version:

Singleton client code for Angular 10.

31 lines (30 loc) 1.16 kB
import { PipeTransform, OnDestroy } from '@angular/core'; import { L10nService } from './services/l10n.service'; import { VIPConfig } from './config'; export declare class L10nPipe implements PipeTransform, OnDestroy { private l10nService; private value; private onTranslationChange; lastKey: string; lastParams: any; constructor(l10nService: L10nService); onTranslation(key: string, source: string, args: any[], locale: string): void; updateValue(key: string, source: string, args: string[], locale?: string): void; transform(key: string, source: string, ...args: string[]): string; private _dispose; ngOnDestroy(): void; } export declare class L10nPipePlus implements PipeTransform, OnDestroy { private l10nService; private value; private onTranslationChange; config: VIPConfig; lastKey: string; lastParams: any; constructor(l10nService: L10nService); onTranslation(key: string, args: any[], locale: string): void; updateValue(key: string, args: any[], locale?: string): void; transform(key: string, ...args: any[]): string; private _dispose; ngOnDestroy(): void; }