🎉 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

Supported Formats

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

The Lingo.dev CLI uses bucket types to parse and translate different file formats. Each bucket type is a dedicated parser designed for a specific format. Configure one or more buckets in your i18n.json to define which files the CLI should translate.

Bucket types#

Bucket typeFormatOutput mode[locale] required
jsonJSON filesSeparate files per localeYes
json5JSON5 filesSeparate files per localeYes
jsoncJSONC files (with comments)Separate files per localeYes
json-dictionaryJSON dictionary (flat key-value)Separate files per localeYes
yamlYAML filesSeparate files per localeYes
yaml-root-keyYAML with locale root keysMutates source fileNo
markdownMarkdown filesSeparate files per localeYes
mdxMDX filesSeparate files per localeYes
markdocMarkdoc filesSeparate files per localeYes
htmlHTML filesSeparate files per localeYes
androidAndroid XML resourcesSeparate files per localeYes
xcode-stringsXcode .strings filesSeparate files per localeYes
xcode-stringsdictXcode .stringsdict filesSeparate files per localeYes
xcode-xcstringsXcode .xcstrings catalogsMutates source fileNo
flutterFlutter ARB filesSeparate files per localeYes
poGNU gettext PO filesSeparate files per localeYes
propertiesJava .properties filesSeparate files per localeYes
csvCSV filesMutates source fileNo
csv-per-localeCSV files (one per locale)Separate files per localeYes
xmlGeneric XML filesSeparate files per localeYes
xliffXLIFF filesSeparate files per localeYes
srtSRT subtitle filesSeparate files per localeYes
vttVTT subtitle filesSeparate files per localeYes
phpPHP localization arraysSeparate files per localeYes
typescriptTypeScript filesSeparate files per localeYes
vue-jsonVue i18n JSON blocksSeparate files per localeYes
txtPlain text filesSeparate files per localeYes
ruby-on-railsRuby on Rails YAMLSeparate files per localeYes

Output modes#

Buckets operate in one of two output modes:

Separate files per locale - the CLI creates a distinct file for each target language. Include patterns must contain the [locale] placeholder:

json
{
  "buckets": {
    "json": {
      "include": ["locales/[locale].json"]
    }
  }
}

This produces locales/en.json, locales/es.json, locales/fr.json, etc.

Mutates source file - the CLI writes translations back into the same file that contains the source content. The [locale] placeholder is not used:

json
{
  "buckets": {
    "csv": {
      "include": ["translations.csv"]
    }
  }
}

CSV files typically store all locales in columns within a single file. Xcode .xcstrings catalogs and YAML with root keys work similarly.

Configuration examples#

Web app with JSON#

json
{
  "buckets": {
    "json": {
      "include": ["src/locales/[locale].json"],
      "lockedKeys": ["brand/name"]
    }
  }
}

Documentation site with Markdown#

json
{
  "buckets": {
    "markdown": {
      "include": ["docs/[locale]/*.md"],
      "exclude": ["docs/[locale]/drafts/*.md"]
    }
  }
}

Mobile app (iOS + Android)#

json
{
  "buckets": {
    "xcode-xcstrings": {
      "include": ["ios/Localizable.xcstrings"]
    },
    "android": {
      "include": ["android/app/src/main/res/values-[locale]/strings.xml"]
    }
  }
}

Monorepo with multiple formats#

json
{
  "buckets": {
    "json": {
      "include": ["apps/web/locales/[locale].json"]
    },
    "mdx": {
      "include": ["packages/docs/content/[locale]/*.mdx"]
    },
    "flutter": {
      "include": ["apps/mobile/lib/l10n/app_[locale].arb"]
    }
  }
}

Bucket-specific features#

Some buckets support additional features beyond include/exclude patterns:

FeatureSupported bucketsDescription
Key LockingKey-value formats (JSON, YAML, etc.)Copy source values without translation
Key IgnoringKey-value formatsExclude keys from target files entirely
Key PreservingKey-value formatsInitialize once, then protect from updates
Translator NotesJSONC, XCStringsProvide context via comments to improve translation

Include pattern rules#

  • Patterns are relative to the i18n.json file location
  • Use [locale] as the placeholder for locale codes (required for "separate files" buckets)
  • Asterisk (*) matches any filename: locales/[locale]/*.json
  • Recursive patterns (**/*.json) are not supported
  • File extensions do not affect parsing - the bucket type determines the parser

Next Steps#

i18n.json
Full configuration reference
Key Locking
Protect specific keys from translation
Existing Translations
Add the CLI to a project that already has translations
Setup
Install and configure the CLI

Was this page helpful?