🎉 v1.0

Get started

  • Welcome
  • Documentation
  • Pricing
    Soon

Tools

  • I18n MCP
  • CLI
  • CI/CD Integrations
  • Compiler
    Alpha
  • Connect Your Engine

Resources

  • Languages
  • LLM Models
  • Guides

Company

  • Enterprise
  • CareersHiring!
Dashboard

Lingo.dev CLI

  • How it works
  • Setup

Configuration

  • Supported formats
  • i18n.json
  • i18n.lock

Features

  • Existing translations
  • Adding languages
  • Overrides
  • Translator Notes
  • Translation keys
    • Key renaming
    • Key locking
    • Key ignoring
    • Key preserving

Performance

  • Large projects
  • Parallel processing

Retranslation

  • Automatic Retranslation
  • Retranslation
  • Remove translations

Key Locking

Max PrilutskiyMax Prilutskiy·Updated 1 day ago·1 min read

Locked keys are copied from the source file to all target files without translation. The Lingo.dev CLI excludes them from translation processing entirely and preserves their source values across all languages.

Configuration#

Add lockedKeys to a bucket in i18n.json:

json
{
  "buckets": {
    "json": {
      "include": ["locales/[locale].json"],
      "lockedKeys": ["brand/name", "config/apiUrl", "system/version"]
    }
  }
}

How it works#

Given this source file:

json
{
  "welcome": "Welcome to our platform",
  "brand": {
    "name": "Lingo.dev"
  },
  "config": {
    "apiUrl": "https://api.example.com"
  }
}

With "lockedKeys": ["brand/name", "config/apiUrl"], the Spanish target file becomes:

json
{
  "welcome": "Bienvenido a nuestra plataforma",
  "brand": {
    "name": "Lingo.dev"
  },
  "config": {
    "apiUrl": "https://api.example.com"
  }
}

Only welcome is translated. Locked keys retain their source values exactly.

Key path notation#

Use forward slash (/) to target nested keys:

json
{ "lockedKeys": ["system/engine/component"] }

Use asterisk (*) to match multiple keys:

json
{ "lockedKeys": ["navigation/menuItems/*"] }

Keys containing dots in their names work naturally - modules/ai.translation targets the key "ai.translation" inside "modules".

Key Locking vs. Key Ignoring#

Key LockingKey Ignoring
Appears in target filesYes - with source valueNo
Use caseBrand names, technical IDs, URLsDebug strings, internal flags, test data

Next Steps#

Key Ignoring
Exclude keys from target files entirely
Key Preserving
Initialize once, then protect from updates
Translation Keys
Overview of all key-level controls
i18n.json
Full configuration reference

Was this page helpful?