|
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

Locales

The CLI translates from one source locale into one or more target locales, both set in .lingo/config.json:

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

Source files are read, never written. Each target locale gets its own output, with the locale code substituted into the file pattern (content/en/app.json → content/de/app.json). See Configuration.

Locale codes#

Use standard BCP 47 tags. A bare language code (de) or a language-region tag (de-CH) both work. The CLI doesn't keep a fixed list — targetLocales accepts any tag and passes it through to your engine. Which locales actually translate, and how well, is the engine's model range, not a CLI limit.

Common examples:

LanguageCode
Englishen (or en-US, en-GB)
Spanishes (or es-ES, es-419, es-MX)
Frenchfr (or fr-FR, fr-CA)
Germande (or de-CH, de-AT)
Portuguesept-BR, pt-PT
Chinesezh-Hans, zh-Hant
Japaneseja
Koreanko

Regional variants#

Pick a region when the dialect matters — the engine renders locale-appropriate spelling and vocabulary:

json
{
  "sourceLocale": "en-US",
  "targetLocales": ["en-GB", "es-ES", "es-419", "pt-BR", "pt-PT", "fr-CA"]
}

en-US → en-GB turns "color" into "colour"; es-ES → es-419 swaps "ordenador" for "computadora". Quality of these distinctions comes from the engine's brand voice and instructions, not the CLI.

Right-to-left languages#

RTL locales (Arabic ar, Hebrew he, Persian fa, Urdu ur) translate like any other. Text direction in your app is your renderer's job; the CLI only produces the translated strings.

Adding or removing a locale#

Editing targetLocales is the whole change. To fill in a newly added locale, run lingo push --backfill-missing — see Adding a locale. To drop one, remove it and delete its files with lingo purge --locale.

Was this page helpful?

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