@giancosta86/hermes
Version:
Minimalist i18n in TypeScript
13 lines • 501 B
TypeScript
import { RMap } from "@rimbu/collection-types";
export type Phrase = string;
export type TranslationsByPhrase = Readonly<{
[phrase: string]: string;
}>;
export declare class Dictionary {
private readonly translations?;
static fromRawTranslations(translations: TranslationsByPhrase): Dictionary;
constructor(translations?: RMap<string, string> | undefined);
translate(phrase: Phrase): Phrase;
toRawTranslations(): TranslationsByPhrase;
}
//# sourceMappingURL=Dictionary.d.ts.map