The locale codes that ship a messages.json, sorted alphabetically.
The currently-active locale code that i18n resolves against.
Switches the active UI locale and notifies subscribers so the React tree
re-renders with the new language. A locale without a bundled messages.json
falls back to the default; a no-op when the locale is unchanged.
React hook that re-renders the calling component whenever the active locale
changes. Subscribe near the app root so a language switch cascades to the
whole tree; bare i18n() calls in descendants then resolve to the new locale.
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).