UNPKG

angular-l10n

Version:

An Angular library to translate messages, dates and numbers

24 lines (23 loc) 999 B
import { L10nConfigRef } from "../models/l10n-config"; /** * Implement this class-interface to create a custom handler for translated values. */ export declare abstract class TranslationHandler { /** * This method must contain the logic to parse the translated value. * @param path The path of the key * @param key The key that has been requested * @param value The translated value * @param args The parameters passed along with the key * @param lang The current language * @return The parsed value */ abstract parseValue(path: string, key: string, value: string | null, args: any, lang: string): string | any; } export declare class L10nTranslationHandler implements TranslationHandler { private configuration; constructor(configuration: L10nConfigRef); parseValue(path: string, key: string, value: string | null, args: any, lang: string): string | any; private handleMissingValue; private handleArgs; }