ng-hub-ui-table
Version:
Highly customizable Angular table and list components with pagination, sorting and filtering support.
31 lines (30 loc) • 1.54 kB
TypeScript
import * as i0 from "@angular/core";
export declare class PaginableTranslationService {
#private;
defaultTranslations: Record<string, string | any>;
translations: Record<string, string>;
private translationSource;
translationObserver: import("rxjs").Observable<any>;
constructor();
initialize(): void;
/**
* Retrieves a value from a translations object based on a given key.
*
* @param {string} key - The `key` parameter in the `getTranslation` function is a string that represents the unique identifier or
* key for the translation you want to retrieve from the translations object. This key is used to look up the corresponding
* translation value in the translations object.
*
* @returns The value associated with the provided `key` from the `translations` object.
*/
getTranslation(key: string): any;
/**
* Merges the default English translations with the provided translations and updates the translation source.
*
* @param {Record<string, string> | any} translations - The `translations` parameter in the `setTranslation` method is a parameter that accepts
* either an object of type `Record<string, string>` or any other type. If no value is provided, it defaults to an empty object
* `{}`.
*/
setTranslations(translations?: Record<string, string> | any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<PaginableTranslationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<PaginableTranslationService>;
}