The message key, e.g. "results_retry".
Optionalsubstitutions: string | string[]Positional substitution value(s) for $name$ placeholders.
The translated, substituted string (or the key if unknown).
i18n("results_error", ["timeout"]); // => "Error: timeout" (en) / "Błąd: timeout" (pl)
export function i18n(key: string, substitutions?: string | string[]): string {
return resolveMessage(currentLocale, key, substitutions);
}
Translates a message key into the currently-active locale. Drop-in replacement for
chrome.i18n.getMessage(key, subs), but reads the app's own locale so the UI can switch language live (see setLocale).