UNPKG

idea-toolbox

Version:
24 lines (23 loc) 717 B
import { Languages } from './languages.model'; /** * Each of the attributes contains the translation in that language of the Label. * * Example: * ``` * name.it: 'ciao'; * name.en: 'hello'; * ``` */ export declare class Label { /** * It supports only _key -> values_ of type string, representing translations in different languages. */ [key: string]: string | any; constructor(x?: any, languages?: Languages); load(x?: any, languages?: Languages): void; validate(languages: Languages): string[]; /** * Translate the label in the desired language; in case there's no translation, get the default one. */ translate(language: string, languages: Languages): any; }