|
Knowledgebase
EnterprisePlatform
PlatformAPIReact (MCP)CLI
IntegrationsReact (Lingo Compiler)
Alpha
GuidesChangelog

Lingo.dev CLI

  • How it works
  • Setup
  • Quick Start

Configuration

  • Supported Formats
  • i18n.json
  • i18n.lock
  • Supported Locales

Features

  • Existing Translations
  • Adding Languages
  • Overrides
  • Translator Notes
  • Translation Keys
  • Key Renaming
  • Key Locking
  • Key Ignoring
  • Key Preserving
  • Extract Keys with AI

Performance

  • Large Projects
  • Parallel Processing

Retranslation

  • Automatic Retranslation
  • Retranslation
  • Remove Translations

Key Preserving

Max PrilutskiyMax Prilutskiy·Updated about 1 month ago·1 min read

Preserved keys are initialized once with source values and then protected from automatic updates. The CLI never overwrites them - they serve as placeholders for content that requires manual translation, such as legal text, compliance copy, or marketing taglines.

Configuration#

Add preservedKeys to a bucket in i18n.json:

json
{
  "buckets": {
    "json": {
      "include": ["locales/[locale].json"],
      "preservedKeys": ["legal/privacy", "legal/terms"]
    }
  }
}

How it works#

Given this source file:

json
{
  "welcome": "Welcome to our platform",
  "legal": {
    "privacy": "We respect your privacy and protect your data.",
    "terms": "By using this service, you agree to our terms."
  }
}

On the first run, the CLI copies preserved keys as-is while translating everything else:

json
// locales/es.json (first run)
{
  "welcome": "Bienvenido a nuestra plataforma",
  "legal": {
    "privacy": "We respect your privacy and protect your data.",
    "terms": "By using this service, you agree to our terms."
  }
}

After you manually translate the legal section, subsequent CLI runs leave your translations intact.

Key Preserving vs. Key Locking#

Key PreservingKey Locking
Initial valueSource value as placeholderSource value (always)
Manual editsPreserved permanentlyOverwritten with source on each run
Use caseLegal, compliance, manual translationBrand names, technical IDs

Key path notation#

Use forward slash (/) for nested keys and asterisk (*) for wildcards:

json
{ "preservedKeys": ["legal/*", "marketing/tagline"] }

Next Steps#

Key Locking
Copy values without translation
Key Ignoring
Exclude keys from target files
Translation Keys
Overview of all key-level controls
Overrides
How manual edits are preserved

Was this page helpful?