🎉 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

i18n.lock

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

i18n.lock is a lockfile that stores SHA-256 fingerprints of your source content. The Lingo.dev CLI compares these fingerprints on every run to determine which strings are new or modified - only those enter the translation pipeline. Everything else is skipped.

Structure#

The lockfile uses YAML format:

yaml
version: 1
checksums:
  a07974ea09011daa56f9df706530e442:
    title: f8692d39317193acf0e2e47172703c46
    description: g9703e40428204bdf1f3f58283814d57
FieldDescription
versionLockfile schema version.
checksumsMap of content fingerprints. Each entry maps a source content hash to a key hash.

The dual-hash structure (content hash + key hash) enables key rename detection - the CLI preserves existing translations when a key is renamed but its content stays the same.

Workflow#

First run - creates the lockfile with fingerprints for all source content:

bash
npx lingo.dev@latest run
# Creates i18n.lock

Subsequent runs - translates only the delta:

bash
npx lingo.dev@latest run
# Compares against i18n.lock, translates only changes

Force retranslation - bypasses the lockfile and retranslates everything:

bash
npx lingo.dev@latest run --force

Recreate lockfile - rebuilds the lockfile from the current state of your source files:

bash
npx lingo.dev@latest lockfile --force

Use lockfile --force to reset the lockfile during merge conflict resolution. It's safe to run at any time.

Frozen verification - fails if any content requires translation (designed for CI/CD):

bash
npx lingo.dev@latest run --frozen

Deduplication#

When merging branches, the lockfile YAML can accumulate duplicate entries. The CLI deduplicates automatically on every load - duplicate keys under the same checksum block are resolved by keeping the last occurrence. If duplicates are removed, the CLI logs the count.

Deduplication runs during all commands that read the lockfile: run, status, lockfile, and others.

Version control#

i18n.lock must be committed to your repository alongside your locale files. It is the mechanism that makes incremental translation possible - without it, every run would retranslate the entire project.

Next Steps#

How It Works
The five-step translation pipeline
Key Renaming
Rename keys without losing translations
Retranslation
When and how to retranslate content
i18n.json
Full configuration reference

Was this page helpful?