MessageEntry type
Last updated: 2026-03-01T23:25:47.122Z
Location
Metrics
LOC: 4
Complexity: 1
Params: 0
Signature
type MessageEntry
Summary
i18n utility — supports both Chrome's native i18n API and a user-selected language override loaded from _locales/{lang}/messages.json. Usage: import { initI18n, t, localizeHTML } from "@/lib/i18n"; // At app startup (once, before any t() or localizeHTML() calls): await initI18n(settings.uiLanguage); // "auto" | "en" | "pt_BR" | "es" // In TypeScript: const label = t("fillAll"); // → "Preencher Tudo" (pt_BR) | "Fill All" (en) // In HTML — add data-i18n attribute, then call localizeHTML() once: //
Source Code
type MessageEntry = {
message: string;
placeholders?: Record<string, { content: string }>;
};
No outgoing dependencies.
No incoming dependencies.