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, Markdown/MDX docs 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",
  "docs": { "include": ["content/docs/**"] }
}

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" | { "sourceOnly": string[] }Next.js only. prefix (default): a URL per language (/ja/…) through a generated proxy. cookie: one URL for every language. { "sourceOnly": ["/docs"] }: a URL per language, except the listed sections, which stay in the source language (no /ja/docs, no hreflang). See Next.js: choosing the language.
docs.includeglobsMarkdown/MDX pages to translate, e.g. content/docs/**. See Translating Markdown and MDX docs.
docs.excludeglobsPages to leave in the source language.
docs.layout"dot" | "dir"Where translations go. dot (default): page.ja.mdx next to page.mdx. dir: <root>/ja/page.mdx.
docs.rootpathThe docs root for the dir layout, e.g. content/docs.
docs.anchorsbooleanDefault true: a translated heading keeps the source heading's id (## Instalación [#installation], Fumadocs syntax), so #installation links still work. Set false for docs tools that don't read [#id].
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/docs-lock.jsonYesEach docs paragraph's translations, so re-runs only translate new or changed paragraphs.
.babelize/local/report.jsonNoThe last run's QA report.

Last updated: 2026-11-18

How is this guide?

On this page