Which SDK do I need and how do I install it?
One package per framework: Next.js, Vite, TanStack Start, Remix/Hydrogen, Expo, Flutter, Swift, Node, or plain core.
There is one SDK per framework, and installing it is a single package plus a provider. Pick the row that matches your stack.
| Stack | Install |
|---|---|
| Next.js (App or Pages Router) | npm i @better-i18n/next |
| Vite + React | npm i @better-i18n/use-intl @better-i18n/vite |
| TanStack Start | npm i @better-i18n/use-intl |
| Remix or Shopify Hydrogen | npm i @better-i18n/remix |
| Expo / React Native | npm i @better-i18n/expo |
| Flutter | flutter pub add better_i18n |
| iOS / Swift | BetterI18n via Swift Package Manager |
| Node backend (Hono, Express, Fastify) | npm i @better-i18n/server |
| Anything else | npm i @better-i18n/core |
All of them do the same job: fetch your published translations from the CDN at runtime, cache them, and hand your app a t(). They differ only in how they hook into that framework's rendering — which is why there is no single "the SDK" to install.
What you configure #
Every SDK needs the same two values, and nothing else to get started:
- Project —
your-org/your-project, the same string the dashboard shows - Source language — the language your keys are written in
Everything else has a default. Published translations are served from a public CDN, so the browser bundle carries no credentials of any kind.
The three-step shape #
- Install the package for your stack from the table above
- Wrap your app in that SDK's provider, passing your project
- Replace hardcoded strings with
t("your.key")
Framework-specific walkthroughs, with the actual provider code:
- Set up Better i18n with Next.js
- Set up the CLI and scan your project — finds the hardcoded strings for you
- How It Works — the CDN contract every SDK reads
Packages that are not translation SDKs #
Four packages share the @better-i18n scope but do a different job. Installing one of these when you wanted translations is a common wrong turn:
| Package | What it is for |
|---|---|
@better-i18n/sdk | Content CMS client — fetches content models and entries, not UI strings |
@better-i18n/content | Content analytics tracking |
@better-i18n/admin | Server-side admin: manage projects, keys, translations programmatically |
@better-i18n/cli | Command line: scan for hardcoded strings, publish, check publish status |
Which one if you use two frameworks #
A monorepo with a Next.js web app and an Expo app installs both @better-i18n/next and @better-i18n/expo. They can point at the same project, or at separate projects if the copy genuinely differs — separate projects mean separate keys and separate coverage.
Do I need an SDK at all #
No. The CDN is plain JSON over HTTPS, so you can fetch it yourself and skip every package on this page — see How It Works for the URL shape. The SDKs exist for caching, SSR without a flash of untranslated content, and locale switching without a reload. If you only need the strings, fetch the file.
Better I18N