UNPKG

@dodona/papyros

Version:

Scratchpad for multiple programming languages in the browser.

17 lines (16 loc) 557 B
import { State } from "@dodona/lit-state"; export type Translations = { [key: string]: string | Translations; }; export declare class I18n extends State { private readonly polyglot; private readonly translations; private _locale; get availableLocales(): string[]; setTranslations(locale: string, translations: Translations): void; set locale(locale: string); get locale(): string; t(phrase: string, options?: Record<string, any>): string; getTranslations(key?: string): Translations | undefined; constructor(); }