Retranslation

Updated: last quarter · 1 min read

Deprecated

These docs cover the legacy CLI (v0). The current CLI is v1. See the current CLI docs

The Lingo.dev CLI provides manual retranslation options for refreshing translations when the source text hasn't changed - after switching AI models, updating translation prompts, or improving localization engine configuration.

For automatic retranslation triggered by source text changes, see Automatic Retranslation.

Complete retranslation#

Bypass the lockfile and retranslate all content:

bash
npx lingo.dev@latest run --force

This retranslates every key in every target language and recreates the i18n.lock file.

Targeted retranslation#

By language#

bash
npx lingo.dev@latest run --force --target-locale es

Retranslates only Spanish while preserving all other languages.

By bucket type#

bash
npx lingo.dev@latest run --force --bucket json

Retranslates only JSON files, leaving Markdown and other formats unchanged.

By key#

bash
npx lingo.dev@latest run --force --key welcome.title

Retranslates a single key across all target languages. Supports glob patterns.

By file#

bash
npx lingo.dev@latest run --force --file blog.[locale].json

Retranslates specific files. Multiple --file flags can be combined.

Combined#

bash
npx lingo.dev@latest run --force --bucket json --target-locale es

Options combine for precise control - this retranslates all JSON content for Spanish only.

Efficient retranslation with purge#

For best performance, use purge before run instead of --force. This leverages the CLI's built-in caching mechanism:

bash
# Remove existing translations for a specific key
npx lingo.dev@latest purge --key welcome.title

# Then regenerate (without --force)
npx lingo.dev@latest run

When to retranslate#

ScenarioRecommended approach
Source text changedAutomatic - no action needed
Switched AI modelsrun --force or targeted retranslation
Updated translation promptsrun --force or targeted retranslation
Improved engine configurationTargeted retranslation for affected locales
Poor quality in specific localerun --force --target-locale <locale>

Next Steps#