Repository navigation
Releases
v3.4.0: one protocol, five new SDKs
Five new SDKs speak the same wire protocol as React and Node: same options
(context, replace, namespace, forceTemporary, originLanguage), same storage
keys, same dashboard and API key. An app that migrates keeps its cache and
its device id.
New packages
- i18n-keyless-vue: Vue 3 plugin, , useI18nKeyless(), useTranslation(),
localized SSR (getServerTranslations, runWithI18nKeyless). - i18n-keyless-angular: standalone APIs, signals, zoneless. provideI18nKeyless(),
, the t pipe, I18nKeylessService, SSR via provideI18nKeylessServer().
Built with ngc, Ivy partial, AOT-ready. - i18n-keyless-browser: framework-free. Plain store, translateDom() for
data-i18n, the web component, and an ./auto script-tag entry.
Works with Svelte, Alpine, htmx, jQuery and plain HTML. - i18n-keyless/laravel (Composer, PHP >= 8.2, Laravel 11 to 13): your existing
__('...') calls resolve through the API. Two .env lines to start. - i18n_keyless (pub.dev, Flutter >= 3.27): I18nKeylessClient, the T widget,
context.t(), Lang enum, SharedPreferences or memory storage.
Protocol and conformance
- docs/PROTOCOL.md: the language-neutral wire protocol, verified against the
API source. - conformance/vectors/*.json: 17 vector files replayed by the core, Laravel
and Flutter test suites. - docs/PORT_CHECKLIST.md: what a new port must ship.
Core
- New sdk runtime labels: vue-client/server, angular-client/server, browser,
laravel, flutter. isServerRuntime() decides who sends a device id. - New pure helpers exported for ports (storageKeyFor, queueIdFor, applyReplace,
buildDictionaryUrl, isRetryableStatus, ...). No behaviour change for
existing callers.
Fixed
- Node: the translate response's numeric row id was cached as the Indonesian
("id") translation of every key. The filter now requires a non-empty string.
Examples: examples/vue-vite, examples/angular, examples/browser,
examples/laravel. Full details in CHANGELOG.md.
v3.2.0: stable client identity
Fixes an MAU over-count. The API counted one user per unique_id header and minted a new id whenever that header was empty — and the POST routes never echoed it back, so no client could reuse one. A project with under 500 real users reported 5,517 MAU.
Devices and servers are now identified differently, via a new sdk header:
- Browser / React Native — the SDK generates an id, persists it under i18n-keyless-user-id, and sends it on every request. Existing installs keep the id they have.
- Node / SSR — sends no id. The API counts the source connection, so a restart no longer bills a new user.
clearI18nKeylessStorageAndStore() now keeps the device id: it clears the cache, not the identity.
Also fixed: awaitForTranslation (node) had its failure cases backwards — ignoring an error was silent, catching one crashed the process. Now: ignore it and you crash, catch it and your fallback runs.
v3.1.0: ETag, re-renders optimization
All three packages — i18n-keyless-core, i18n-keyless-react, i18n-keyless-node —
share this version. No breaking change.
Conditional dictionary fetches: ETag / If-None-Match
Dictionary fetches now use HTTP conditional requests. The SDK keeps the ETag of every
dictionary it fetched and replays it as If-None-Match. An unchanged namespace answers
304 Not Modified with no body, and the SDK keeps the dictionary it already stored.
Once it holds an ETag, the SDK drops last_refresh from the URL. Freshness travels in
the header instead, so the URL becomes stable and any shared HTTP cache — a CDN, a proxy —
can serve it.
I18nKeylessResponseandI18nKeylessAllTranslationsResponsegained an optional
etag?: stringandnotModified?: boolean. Additive, so non-breaking.- The ETag map is in-memory only. After a restart the first fetch is a plain
200,
exactly as before. etagCacheKey(apiKey, lang, namespace)is exported fromi18n-keyless-core.
Nothing to configure. The API still supports last_refresh forever, so an older SDK keeps
working unchanged.
Network resilience on every API call
The four api.* methods now share one fetchWithRetry:
- a 10 s timeout (
AbortController), so an app never hangs on a slow API; - 3 attempts, with a 500 ms then a 1500 ms backoff;
- retries a network error, a 5xx and a 429 — all transient;
- no retry on any other 4xx: a wrong key stays wrong, and a retry only burns quota;
- never throws. Every failure resolves to
{ ok: false, error }, so your app falls
back to its stored translations instead of showing empty text. A timeout reports
error: "timeout".
A failed call never clears the cached translations.
<T> re-renders only when its own text changes — i18n-keyless-react
<I18nKeylessText> selected the whole translations map. Every batch that lands rebuilds
that object, so the equality check always failed and every <T> on the page
re-rendered — including the ones whose text had not changed, and the ones in another
namespace. <T> now selects the single string it renders.
Measured on a 50-<T> page:
| Event | Before | After |
|---|---|---|
| A batch lands for another namespace (chat / checkout / UGC) | 50 re-renders | 0 |
| A batch adds one new key | 50 re-renders | 1 |
| A language switch | 50 re-renders | 50 (every text really does change) |
Apps that use namespaces gain the most, above all apps with high-cardinality
unpersistedNamespace namespaces (one per discussion).
Docs: getTranslation() needs useCurrentLanguage() in the same component
getTranslation is a plain function, not a hook. It reads the store once and never
subscribes. So the component that calls it does not re-render on a language switch, and
its text stays in the previous language — while the <I18nKeylessText> next to it
updates, because <T> subscribes on its own. That is why a page can switch only some of
its texts.
Call useCurrentLanguage() at the top of any component that calls getTranslation(), even
when you ignore the return value:
function Hero() {
useCurrentLanguage(); // subscribe: re-render when the language changes
return <h1>{getTranslation("Votre coach de vie")}</h1>;
}v3.0.1: fix: re-export resolveLang and toAppStoreLocale from the react and node SDKs
Fixed
resolveLang, toAppStoreLocale and APP_STORE_LOCALES are now re-exported from
i18n-keyless-react and i18n-keyless-node. On 3.0.0 they existed only on
i18n-keyless-core, so importing them from your SDK failed — and although core is
installed as a transitive dependency, the import resolved under npm's flat
node_modules while failing outright under pnpm and Yarn PnP.
// 3.0.0 — only this worked, and only on npm
import { resolveLang } from 'i18n-keyless-core';
// 3.0.1 — import from the same package as the rest of your SDK
import { resolveLang } from 'i18n-keyless-react';
This mainly affects anyone following the v3 upgrade
guide, whose
storage-migration snippet uses resolveLang.v3.0.0: 48 languages available, still natural language all along
i18n-keyless translates your app by writing your own words in your own language.
No keys, no t("home.hero.title"), no JSON files to keep in sync. You write
<T>Bienvenue</T> and every user reads it in their language.
v3 makes that reach further: 48 languages, user-generated content, and
server-side rendering that ships real translated HTML.
🌍 48 languages, covering every App Store localization
Every language Apple's App Store supports, including the 11 added in March 2026 —
Bangla, Gujarati, Kannada, Malayalam, Marathi, Odia, Punjabi, Slovenian, Tamil,
Telugu, Urdu.
Most codes stay bare, because a bare code already matches every region of that
language: fr covers fr-FR, fr-CA, fr-BE, fr-CH. Regions appear only where the
translation is genuinely different text — zh-Hans/zh-Hant, pt-BR, es-MX,
fr-CA, en-GB.
languages: { primary: "fr", supported: ["en", "es", "ja"] }You're billed per language you opt into, so that list is the whole cost model.
Any of the 48 can be your primary language. v2 let you author in French or
English only.
Shipping to the App Store?
toAppStoreLocale("fr"); // "fr-FR"
toAppStoreLocale("pt"); // "pt-PT"Your Lang maps straight onto an App Store Connect listing slot, so the same
codes drive your UI and your store metadata.
Matching a device
resolveLang("pt-BR"); // "pt-BR"
resolveLang("pt-AO"); // "pt" — no Angolan variant, falls back
resolveLang("zh-TW"); // "zh-Hant"
resolveLang(navigator.language, { supported: ["pt", "en"], fallback: "en" });Hand it anything BCP-47 — navigator.language, expo-localization, an
Accept-Language header — and get back a language you actually ship.
💬 Translate what your users write
Reviews, comments, chat messages. Same component:
<T originLanguage="es">Hola mundo</T>A French reader sees "Bonjour le monde", an English reader "Hello world", and a
Spanish reader gets the original text back untouched.
The same sentence submitted by ten users costs one translation. For
high-cardinality content, keep it in memory only:
<T originLanguage={msg.lang} namespace={`chat-${roomId}`} unpersistedNamespace>
{msg.body}
</T>🖥️ Server-side rendering, without touching your SPA
Real translated HTML for crawlers, no flash of untranslated text:
<I18nKeylessProvider lang={lang} translations={await getServerTranslations(lang)}>
<App />
</I18nKeylessProvider>The language lives in per-render context, not a global, so concurrent requests in
different languages never mix. <T> reads the provider first and falls back to
the store — adding SSR changes nothing about how your existing app works.
Works with Next.js, Remix, Astro, TanStack Start. Runnable examples for all of
them in examples/.
🗂️ Namespaces
Split a large project so each screen downloads only what it renders, and no
storage quota blows up:
<T namespace="checkout">Payer</T>Text already translated under another namespace is reused, never re-paid for.
🐛 Fixed
- The request queue could exceed its concurrency limit. Asking twice for the
same string while the queue was full ran the second one immediately, past the
limit — and corrupted the counter so the limit stopped holding afterwards. The
SDK could end up firing unbounded parallel requests. clearI18nKeylessStorageAndStore()never cleared storage. It wiped the
config first, then read the storage adapter from that config.- Tasks queued in the same millisecond could collide and be silently dropped.
⚠️ Upgrading from v2
Two language codes were non-standard and are gone: cn → zh-Hans and
cz → cs. The other 17 v2 codes are unchanged.
- supported: ["fr", "en", "cn", "cz"]
+ supported: ["fr", "en", "zh-Hans", "cs"]Requires the v3 backend. If you self-host, update it before upgrading clients.
Docs: README · SSR guide ·
full changelog