Skip to content
On this page

Getting started

How you start depends on your app: it already has translation files, or it has none yet. In both cases you need a Locize project: sign up and create one.

Your app already has translation files

Locize reads the file formats of most i18n libraries: JSON, XLIFF, YAML, gettext, Android and Apple strings, and more. locize-cli sends them to your project. Your coding agent can do this for you: with the MCP server or the Locize plugin, it loads the skill locize-sync-translation-files, which recognizes your library and file format and runs the first import and the later syncs.

  1. Log in once on your machine. The CLI keeps a personal access token, so you need no API key here. It uses that token only when no other key is set: an apiKey in a .locize file (in the folder or your home directory) or LOCIZE_API_KEY comes first.

    bash
    npx locize-cli login
  2. Commit your files first: sync also writes changes from Locize back into the folder. The project's source language must have the same code as your files (en is not en-US). Then send them to Locize once. --reference-language-only false sends your existing translations too, not only your source language. --auto-translate false keeps Locize from translating every new key into every target language: your translations would stay, but the run would use your AI tokens or MT characters and send the texts to the providers.

    bash
    npx locize-cli sync --project-id <your-project-id> \
      --path ./locales --format json \
      --reference-language-only false --auto-translate false

The CLI expects one folder per language and one file per namespace, for example locales/en/common.json. Other layouts, and how to keep your files and Locize in step afterwards, by hand or in CI: locize-cli.

Your app reads the files from your repository, or loads the translations from the CDN.

Your app has no translations yet

Your coding agent sets up i18next in your app. Install the skill once in your project:

bash
npx skills add i18next/i18next-cli

Then tell your agent: "Localize this app." Without the skill, paste this into your agent:

Prompt
Localize this app with i18next.
Run `npx i18next-cli localize --print-agent-prompt` and follow
the steps it prints, in order, checking each one before the next.

The agent asks you once whether to manage the translations with Locize or keep the files in your repository only. If you choose Locize, it asks for your project ID and an API key with write access, and keeps both in environment variables, never in your code. It wraps your texts in t(), sends the keys to Locize and downloads the translations into your repository. You review the diff.

The agent sets up React and Next.js apps directly, and Vue and Svelte apps with a plugin of the CLI.

What Locize does with new keys

  • It translates them automatically with AI. A new project includes starter translation credits, enough to try it on a few keys. For a whole app you need a plan. From Growth on, you can also use the key of your own AI provider.
  • It publishes every change of the version latest to the CDN.

Next

  • Best practices: what to check before your app goes live.
  • Review workflow: if people should check translations before they go live.
  • Integrate: other ways to connect your app, such as the CDN, the API or a library.