|
Documentation
Book a DemoPlatform
PlatformMCPCLI
APIWorkflows
GuidesChangelog

Overview

  • @lingo.dev/cli

Getting started

  • Quickstart
  • Configuration

Reference

  • lingo push
  • lingo pull
  • Other commands
  • lingo purge

Configuration

  • Key controls
  • Formats
  • Locales

Guides

  • Adding a locale
  • Existing translations
  • Retranslation
  • Translator notes
  • Runs, state, and recovery
  • CI/CD
  • Monorepos
  • Large projects

Looking for the older CLI (v0)? See the legacy CLI docs

Adding a locale

Adding a language is two steps: list it as a target, then backfill.

1. Add the locale to your config#

Edit targetLocales in .lingo/config.json:

json
{
  "sourceLocale": "en",
  "targetLocales": ["de", "fr", "es", "ja"]
}

ja is the new one here. Any BCP 47 code works.

2. Backfill the new locale#

bash
lingo push --backfill-missing

--backfill-missing translates every target that doesn't exist yet, across every configured pattern. The existing de, fr, and es files are already present, so they're skipped — only the new ja files are produced.

text
✓ Run lfr_a8c...: localized 14 target file(s), 0 already up-to-date.

Why not a plain push?

A bare lingo push only looks at sources whose hash changed since the last run. Adding a locale doesn't change any source, so a plain push would find nothing to do. --backfill-missing keys off missing target files instead, which is exactly what a new locale produces.

Estimate first#

To see the cost of adding a locale before spending anything:

bash
lingo push --backfill-missing --estimate

Prints the estimated cost and exits without translating. See Retranslation for more on --estimate and --force.

Removing a locale#

Drop it from targetLocales, then delete its files:

bash
lingo purge --locale ja

See Purge.

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated about 8 hours ago·1 min read