BabelizeBabelize
CLI

Project Config

Every key in .babelize/config.json: source and target locales, include and exclude paths, glossary, brand voice, formality, Next.js routing and the cloud project link.

.babelize/config.json holds a project's Babelize settings. babelize translate, babelize check, babelize scan and the MCP tools read it from the project root. Commit it, so teammates, CI and cloud runs from GitHub use the same settings.

Everything is optional. A missing or malformed file means defaults.

.babelize/config.json
{
  "sourceLocale": "en",
  "targetLocales": ["es", "ja", "ar"],
  "include": ["src/app/**", "src/components/**"],
  "exclude": ["src/registry", "**/*.stories.tsx"],
  "glossary": {
    "neverTranslate": ["Babelize", "React"],
    "alwaysTranslateAs": [
      { "term": "workspace", "translations": { "de": "Arbeitsbereich", "ja": "ワークスペース" } }
    ]
  },
  "brandVoice": "Friendly, concise, no jargon",
  "formality": { "de": "formal", "it": "informal" },
  "routing": "prefix"
}

Keys

KeyTypeWhat it does
sourceLocalelocale codeThe language your app is written in. Default en. --from overrides it.
targetLocaleslocale codesThe languages babelize check expects and the guided npx babelize remembers. translate --to sets the languages per run.
includeglobsOnly these paths are scanned and rewritten. Relative to the project root; a plain path like src/app covers everything under it. --include replaces it for one run. See Choosing which files are translated.
excludeglobsNever these paths, even when included: a component library published from the same repo, a CLI, fixtures. --exclude replaces it for one run.
glossary.neverTranslatestringsTerms kept as written in every language: product, brand and tool names. See Glossary.
glossary.alwaysTranslateAs{ term, translations }[]A fixed translation per language for a term.
brandVoicestring, up to 300 charactersTone and style for LLM translators. --brand-voice replaces it for one run. See Brand voice.
formality{ [locale]: "formal" | "informal" | "auto" }Form of address per language. --formality is merged over it. See Formality.
routing"prefix" | "cookie"Next.js only. prefix (default): a URL per language (/ja/…) through a generated proxy. cookie: one URL for every language. See Next.js: choosing the language.
projectIdstringLinks the folder to a cloud project. Written by babelize init; used by babelize run start and other cloud commands.

Older keys are still read: source / sourceLanguage for sourceLocale, targetLanguageIds / targetLanguages for targetLocales, and customTranslations for the glossary.

Files next to it

PathCommit it?What it is
.babelize/config.jsonYesThis file.
.babelize/local/babelize-lock.jsonYesEach key's source text and translations, so re-runs only translate new or changed strings.
.babelize/local/report.jsonNoThe last run's QA report.

Last updated: 2026-11-01

How is this guide?

On this page