馃帀 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

Existing Translations

Max PrilutskiyMax Prilutskiy路Updated 1 day ago路2 min read

The Lingo.dev CLI integrates with projects that already have translation files. It compares source keys against existing target files, generates only the missing translations, and leaves your existing work untouched.

How it works#

When you run the CLI on a project with partial translations, it performs a gap analysis:

json
// locales/en.json (source - 4 keys)
{
  "welcome": "Welcome to our app",
  "button.save": "Save",
  "button.cancel": "Cancel",
  "error.network": "Network error"
}

// locales/es.json (existing - 2 keys translated)
{
  "welcome": "Bienvenido a nuestra aplicaci贸n",
  "button.save": "Guardar"
}

Running npx lingo.dev@latest run fills in only the missing keys:

json
// locales/es.json (after run - all 4 keys present)
{
  "welcome": "Bienvenido a nuestra aplicaci贸n",
  "button.save": "Guardar",
  "button.cancel": "Cancelar",
  "error.network": "Error de red"
}

The existing welcome and button.save translations remain unchanged.

First run#

On the first run, the CLI creates an i18n.lock file based on your current state. This lockfile records fingerprints for all source content, ensuring existing translations are not regenerated on subsequent runs - even if they were originally created by a different tool.

Ensure your target language files do not contain content in the source language. Having untranslated source text in target files can interfere with gap detection.

Migrating from other tools#

The CLI works with translation files created by any tool, as long as they follow a supported format (JSON, YAML, PO, etc.):

1

Configure i18n.json

Set up bucket patterns that match your existing file locations.

2

Run translations

The CLI fills in missing keys while preserving existing translations.

3

Review and commit

Only the gaps are filled. Your existing translations stay intact.

Refreshing translations#

If existing translations have quality issues, you can selectively retranslate:

bash
# Retranslate all Spanish content
npx lingo.dev@latest run --force --target-locale es

# Retranslate a specific key across all languages
npx lingo.dev@latest run --force --key error.network

For more options, see Retranslation.

Next Steps#

Adding Languages
Expand to new target locales
Overrides
Manually override specific translations
i18n.lock
How the lockfile tracks translation state
Retranslation
Refresh translations when needed

Was this page helpful?