New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@sonenta/i18n-core

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sonenta/i18n-core

Framework-agnostic Sonenta i18n engine — CDN bundles, surfaces, a11y, plurals, missing-key, language catalog. Powers the @sonenta framework bindings.

Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

@sonenta/i18n-core

The framework-agnostic Sonenta i18n engine. It is the shared core under the official framework bindings — @sonenta/react-i18next, @sonenta/vue-i18n, @sonenta/svelte-i18n, and @sonenta/next — so they all resolve translations identically.

Most apps should install a binding (e.g. @sonenta/react-i18next), not this package directly. Use @sonenta/i18n-core only to build a custom binding or to drive translations from non-UI code.

npm install @sonenta/i18n-core i18next

What's in the core

Everything framework-neutral, extracted from @sonenta/react-i18next (the oracle — the core passes react-i18next's own engine test suite):

  • SonentaI18n — the engine: CDN bundle loading, sync offline construction from initialBundles, start(), t(), subscribe()/getSnapshot()/ refresh() (an external-store contract any framework can bind to).
  • Surface variants (#911)setSurface(), sparse {ns}.{surface}.json overlays, surfaceForWidth, breakpoints.
  • A11y surfaces (#989)aria()/alt()/a11y() + plain-language toggle; the key-type taxonomy (treatmentsFor, baseRoleFor).
  • Language catalog (#803)dir()/nativeName()/languageMeta().
  • Available languages — per-version manifest.
  • Missing-key streaming + gate, CLDR plurals, the on-screen key registry (feeds @sonenta/feedback), and the transport abstraction.

Framework-neutral by injection

The engine inits a vanilla i18next instance. A binding injects its own i18next plugin (e.g. initReactI18next) via the constructor:

import { SonentaI18n } from "@sonenta/i18n-core";
import { initReactI18next } from "react-i18next";

// React binding:
const i18n = new SonentaI18n(config, { plugins: [initReactI18next] });

// Vanilla / Vue / Svelte: no React plugin.
const i18n = new SonentaI18n(config);
await i18n.start();
i18n.t("home.title");

i18next is a peer dependency (>=23 <27) — bring your own.

License

MIT © Sonenta

Keywords

i18n

FAQs

Package last updated on 14 Jul 2026

Related posts