🎉 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 Renaming

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

The Lingo.dev CLI detects when you rename translation keys and preserves existing translations automatically. If the key name changes but the source content stays the same, the CLI applies the existing translation to the new key - no retranslation occurs.

How it works#

The CLI compares content fingerprints, not key names. When a fingerprint match is found under a different key, the CLI recognizes it as a rename.

json
// locales/en.json (before refactoring)
{
  "welcome_msg": "Welcome to our platform",
  "btn_save": "Save"
}

// locales/es.json (existing translations)
{
  "welcome_msg": "Bienvenido a nuestra plataforma",
  "btn_save": "Guardar"
}

After renaming keys in the source file:

json
// locales/en.json (after refactoring)
{
  "homepage.welcome": "Welcome to our platform",
  "button.save": "Save"
}

Running npx lingo.dev@latest run preserves the translations:

json
// locales/es.json (translations carried forward)
{
  "homepage.welcome": "Bienvenido a nuestra plataforma",
  "button.save": "Guardar"
}

Detection rules#

Key rename is detected when:

  • The key name changes
  • The source content remains identical
  • The key exists in the same bucket

Key rename is not detected when:

  • Both key and content change simultaneously (treated as a new key)
  • Only the content changes (treated as a content update, triggers retranslation)

Mass refactoring#

Rename detection works at any scale. You can reorganize your entire key structure - from flat keys to nested namespaces - and the CLI carries all matching translations forward in a single run.

Next Steps#

i18n.lock
How fingerprinting enables rename detection
Overrides
How manual edits are preserved
Translation Keys
Overview of all key-level controls
Retranslation
Force retranslation when needed

Was this page helpful?