Moving an i18next app from Locize to localize.work
Step-by-step guide to moving an i18next app from Locize to localize.work, covering export, v3 and v4 plurals, backend options, and publishing.
If your app already runs i18next with i18next-locize-backend, moving to localize.work leaves your translation keys and t() calls untouched. Both platforms serve plain i18next JSON namespaces and plural forms.
The main difference is how usage is metered. On Locize pricing, plans are per project and scale by hosted words (source plus target languages), languages, users, and monthly CDN downloads. On localize.work, plans meter unique keys per organization and monthly built-in AI words, with unlimited seats and CDN delivery included (pricing, calculator).
Here is how to export from Locize, import your strings, swap the backend plugin, and adjust to explicit publishing.
1. Export your translations from Locize
Download the published translations of the Locize version your app loads, not an export of everything in the editor. You will import them as reviewed, and reviewed text is what localize.work publishes, so edits that never went live in Locize would go live at cutover.
Locize's CLI (Node 22 or later) downloads published files by default:
npx -p locize-cli locize download --project-id <your-locize-project-id> --ver <version-your-app-loads> --format flat --path ./locize-export
Download into a new, empty folder each time: the CLI does not clear the folder first, so files left from an earlier download would be imported too. Keep --format flat: the CLI's default format nests keys on dots, which drops a key such as a.b when a is also a key and turns keys such as label.0 into arrays the importer skips. Before importing, check that the folder has one subfolder per language; a language setting in a .locize file or a LOCIZE_LANGUAGE variable limits the download to that one language. Add --cdn-type pro if your Locize project uses the pro CDN. The files land as <locale>/<namespace>.json (such as en/common.json and de/common.json), which is the layout the importer expects, as a folder or in one .zip.
2. Create the project and import
Sign in at app.localize.work and create a project. Add your source language and every target language before importing so folder names map automatically.
Two things to know first:
- The project slug is permanent. It is derived from the project name at creation time and forms every CDN URL. Renaming the project later does not change the slug.
- Regional locales are sparse variants. Codes canonicalize to BCP 47 (
en-fibecomesen-FI). If bothenanden-FIbelong to the same project,en-FIis treated as a sparse override layer. Read variant locales before tuningloadorfallbackLng.
Import in the editor
Open Project settings → Import and drop the downloaded folder (or a .zip of it, or the .json files). The editor unpacks .zip archives in the browser (up to 256 MB compressed and 64 MB of JSON), infers locale and namespace from <locale>/<namespace>.json, flattens nested objects, and collapses i18next v4 plural suffixes (_one, _other, etc.) into plural keys.
If your Locize export uses older i18next v3 plurals (key + key_plural, or numbered key_0, key_1, key_2), tick Plurals use the older i18next v3 keys. The editor also flags _plural keys if you leave it unticked. The import decides which numbered keys are plurals from the files in the same import, so if you split v3 files into batches, keep every language of a namespace in the same batch. See importing older i18next v3 files.
The import converts these plurals to the current i18next format (key_one, key_other), and releases are published only in that format. If your app sets compatibilityJSON: 'v3', remove it when you switch backends, and check singular and plural strings in each language before cutover; otherwise i18next keeps looking up key_plural and plural text goes missing.
Keys ending in _zero need a look too. i18next uses key_zero for a count of 0 whenever it exists, even in languages such as English that have no zero plural form, but the import of current (v4) plurals keeps only the forms each language uses and skips the rest with a warning. If the preview says it skipped _zero keys, t('items', { count: 0 }) will show the text of the form that language uses for 0 after cutover: _other in English, German or Spanish, _one in French or Brazilian Portuguese, _many in Russian or Polish. A key with only a plain value and a _zero key (items and items_zero, no _one or _other) loses its plain value in every language, because the import reads items as a plural; where _zero is skipped too, that language has no text for items at any count, and i18next falls back as for any missing key: to the base language (en for en-GB), then fallbackLng, then the key name. Rename items_zero before importing. To keep a separate text for zero, give it its own key and pick it in code, for example count === 0 ? t('items_none') : t('items', { count }). With the v3 option ticked, _zero keys are kept as keys of their own, so i18next still finds them at count 0.
Published files nest dotted key names: button.save becomes { "button": { "save": … } }. If your app sets keySeparator: false to read flat keys with dots in them, switch back to the default . separator before cutover, or t('button.save') shows the key instead of the text.
If flat Locize files contain both a text key a and a child a.b, localize.work keeps both and publishes a.b at the top level so i18next (ignoreJSONStructure, on by default) resolves every string. See published JSON format.
Import as Reviewed, since this is the text your users see today. If you had edits pending in Locize, make them again in the editor once your first release matches production. Click Preview to run a dry run and inspect warnings, then click Import. Each import request takes up to 200 files and 16 MB; larger projects can be imported in batches.
CLI and REST API imports
Only the editor unpacks .zip files directly:
@localize-work/cli(preview, Node 20+) reads unpacked JSON files from disk (i18next,i18next-flat,icu,icu-flat). It does not read.ziparchives ori18next-v3. For unpacked v4 files, install it (npm install --save-dev @localize-work/cli; the unscopedlocalizepackage on npm is unrelated), set upLOCALIZE_API_KEYand the path to your unpacked files as described in the CLI docs (the key needs the push permissions listed there, including Review translations), then runnpx localize push --all-locales --status reviewed --dry-run, and run it again without--dry-run.- REST API (
POST /v1/imports) accepts up to 200 unpacked JSON files per call and supports"format": "i18next-v3". See Import files.
Before you publish: published files on cdn.localize.work are public. Anyone who knows the URL can read them, and release files are cached for a year. If your Locize version is private because the text must stay confidential, localize.work's delivery is not a fit for that text today.
Publish release v1 in the editor and verify it:
curl https://cdn.localize.work/<your-project-slug>/latest.json
# { "version": "v1" }
curl https://cdn.localize.work/<your-project-slug>/v1/en/common.json
3. Swap the backend package and options
SDK 0.11.1 works with i18next 23 to 27 and needs Node 18+ or any runtime with a global fetch (i18next 27 itself needs Node 22). Install it first, then remove the Locize backend:
On i18next 23 to 27: keep your versions and install only the SDK.
npm install @localize-work/i18next-backend npm uninstall i18next-locize-backendOn i18next 22 or older: upgrade i18next first. i18next 27 and react-i18next 18 need Node 22 or later; on Node 18 or 20, use i18next 26 and react-i18next 17. All of them need TypeScript 5 or later if your project uses TypeScript. Read i18next's migration guide, and for React apps react-i18next's changelog, before upgrading.
# React apps on Node 22+ npm install i18next@^27 react-i18next@^18 @localize-work/i18next-backend # React apps on Node 18 or 20 npm install i18next@^26 react-i18next@^17 @localize-work/i18next-backend # Apps without React: i18next@^27 on Node 22+, i18next@^26 otherwise npm install i18next@^27 @localize-work/i18next-backend # then, in every case npm uninstall i18next-locize-backend
Check the SDK docs for the range a newer SDK release supports.
How i18next-locize-backend options map to @localize-work/i18next-backend:
i18next-locize-backend |
@localize-work/i18next-backend |
Notes |
|---|---|---|
projectId |
projectSlug |
Required. Derived from project name at creation. |
| (built-in CDN URL) | cdnBaseUrl |
Required unless loadPath is set ('https://cdn.localize.work'). |
version ('latest' or named) |
version ('latest' or 'v1', 'v2', …) |
Defaults to 'latest'. Numbered immutable releases only. |
apiKey |
apiKey + apiBaseUrl |
Dev-only for saveMissing and trackUsage. Public key (lw_pub_...); pass both or omit both. |
referenceLng |
(not used) | Configured on the project in localize.work. |
allowedAddOrUpdateHosts |
(gate saveMissing in code) |
Enable saveMissing only in dev builds. trackUsage supports allowedHosts. |
reloadInterval |
(not built in) | No background polling; re-initialize i18next on long-running servers to pick up a new release. |
Before (Locize):
import i18next from 'i18next';
import LocizeBackend from 'i18next-locize-backend';
export const i18nReady = i18next.use(LocizeBackend).init({
lng: 'de',
fallbackLng: 'en',
ns: ['common'],
defaultNS: 'common',
saveMissing: import.meta.env.DEV,
backend: {
projectId: import.meta.env.VITE_LOCIZE_PROJECT_ID,
apiKey: import.meta.env.DEV ? import.meta.env.VITE_LOCIZE_API_KEY : undefined,
referenceLng: 'en',
version: 'latest',
},
});
After (localize.work):
import i18next from 'i18next';
import LocalizeBackend from '@localize-work/i18next-backend';
const publicKey = import.meta.env.DEV ? import.meta.env.VITE_LOCALIZE_PUBLIC_KEY : undefined;
export const i18nReady = i18next.use(LocalizeBackend).init({
lng: 'de',
fallbackLng: 'en',
ns: ['common'],
defaultNS: 'common',
saveMissing: Boolean(publicKey),
backend: {
projectSlug: '<your-project-slug>',
cdnBaseUrl: 'https://cdn.localize.work',
...(publicKey
? {
apiBaseUrl: 'https://api.localize.work',
apiKey: publicKey,
}
: {}),
},
});
Await i18nReady in your startup code before rendering rather than with a top-level await, which Vite 6's default build target rejects. Keep the public key in .env.local as VITE_LOCALIZE_PUBLIC_KEY=lw_pub_.... Without it, saveMissing and the API options stay off: passing apiBaseUrl without apiKey throws at init().
By default (strict: false), a 404 on a namespace file resolves to {} so sparse variant locales fall back to their base language. If you log onFailedLoad, ignore status === 404 for variant locales.
4. How saveMissing differs
Both backends support saveMissing during development and advise against shipping write keys to production. In localize.work (SDK saveMissing, API spec):
- Public keys only. Create a public key (
lw_pub_...) in Project settings → API keys. Secret keys (lw_sec_...) are rejected, and passing only one ofapiBaseUrlorapiKeythrows atinit(). - Create-only. Existing translations are never overwritten, so there is no
updateMissingoverwrite behavior. - Locale-based status. Source-locale keys arrive
reviewed; target-locale keys arrivedraftand wait for review before publishing. - Batching and limits. Missing keys batch per
(locale, namespace)in a microtask and split to stay under 1,000 entries and 1 MiB per request. Fixed 60-second rate limits apply per key (60 requests, 2,000 entries) and per IP (30 requests, 1,000 entries). Hitting your key limit soft-fails (limitReached: true) without rolling back existing-key updates.
5. How publishing differs
Locize supports both auto-publish and manual publish per version (see Locize's documentation).
localize.work has no auto-publish (How it works, CDN contract):
- Only
reviewedtext ships. Each publish snapshots the active release and overlays every currently reviewed row. Draft and unreviewedtranslatedrows stay in the editor. - Immutable files plus one pointer. Files are written to
/<slug>/vN/<locale>/<ns>.jsonfirst, and/<slug>/latest.jsonmoves last. Apps never see half a release. - One release per startup. There is no
latest/<locale>/<ns>.jsonpath. The SDK readslatest.jsononce per instance and fetches every namespace from that version. - Caching and rollback.
latest.jsoncaches for up to 5 minutes (max-age=300); release files cache for a year (max-age=31536000, immutable). Rollback pointslatest.jsonat an earlier release without rewriting files (Free keeps the last 3 releases; paid plans from €4.99/month keep all releases).
You can publish from the editor, from CI (npx @localize-work/cli publish --yes), via POST /v1/releases, or with an AI agent granted publish rights.
6. What is different and what is not there yet
Check whether your team depends on Locize features that localize.work does not offer today:
- Named versions and branching: Locize lets you keep several named versions (for example
latestandproduction) and work on branches. localize.work uses one linear release sequence (v1,v2, …); branching is on the roadmap. - Auto-publish and polling: No auto-publish toggle and no built-in
reloadInterval. - Private CDN downloads: Locize supports authenticated private versions. On localize.work, published CDN files are public by design.
- Webhooks: Publish webhooks are planned, not shipped yet.
- Translation agency orders: Locize lets you order human translation from partner agencies inside the product. localize.work focuses on your team, built-in AI translation (0 words/month on Free; 5k, 20k, or 200k on paid plans), and coding agents via REST or MCP (which do not spend AI words).
- In-context editing: Available in preview (
LocalizeInContextwith?localize=edit), opening the editor in a popup window rather than an embedded iframe (docs). - Maturity and hosting:
@localize-work/i18next-backendis pre-1.0, and the CLI, REST API, MCP server, in-context editing, and key usage tracking are preview. The app and database are hosted in the EU, and there is no self-hosting option. Today the editor, API, andcdn.localize.workrun as one service, so an outage affects uncached startups as well as editing.
7. Cutover checklist
- Download the published translations from Locize with its CLI (section 1) and create your localize.work project with matching languages.
- Preview and import them in the editor as
Reviewed(ticking v3 plurals if needed) and publishv1. - Verify
latest.jsonand sample files oncdn.localize.workwithcurl. - On a branch, install the SDK as in section 3 (upgrading i18next only if it is outside 23 to 26), swap to
@localize-work/i18next-backend, remove anycompatibilityJSON: 'v3'andkeySeparator: false, test plurals, fallback and regional variants, and wire dev-onlysaveMissingwith alw_pub_...key. - Deploy and confirm traffic under Releases (download figures).
- Keep Locize intact until older client builds and caches rotate off it.