Localess
CLI

Translations

Push and pull translation files between your local project and Localess.

Push

Push a local JSON translation file to your Localess space. Only keys present in the file are affected, based on the selected update type.

localess translations push <locale> --path <file> [options]

Arguments

ArgumentDescription
<locale>ISO 639-1 locale code (e.g., en, de, fr)

Options

FlagDefaultDescription
-p, --path <path>(required)Path to the JSON translations file
-f, --format <format>flatFile format: flat or nested
-t, --type <type>add-missingUpdate strategy: add-missing or update-existing
--dry-runfalsePreview changes without applying them

Update Strategies

TypeDescription
add-missingAdds translations for keys that do not yet exist in Localess
update-existingUpdates translations for keys that already exist in Localess

File Formats

  • flat — A flat JSON object where keys may use dot notation:

    {
      "common.submit": "Submit",
      "nav.home": "Home"
    }
  • nested — A nested JSON object that is automatically flattened before uploading:

    {
      "common": { "submit": "Submit" },
      "nav": { "home": "Home" }
    }

Examples

# Push English translations (add missing keys only)
localess translations push en --path ./locales/en.json

# Push with update-existing strategy
localess translations push en --path ./locales/en.json --type update-existing

# Preview changes without applying (dry run)
localess translations push en --path ./locales/en.json --dry-run

# Push nested-format translations
localess translations push de --path ./locales/de.json --format nested

Pull

Pull translations from your Localess space and save them to a local file.

localess translations pull <locale> --path <file> [options]

Arguments

ArgumentDescription
<locale>ISO 639-1 locale code (e.g., en, de, fr)

Options

FlagDefaultDescription
-p, --path <path>(required)Output file path
-f, --format <format>flatFile format: flat or nested

Examples

# Pull English translations as flat JSON
localess translations pull en --path ./locales/en.json

# Pull German translations as nested JSON
localess translations pull de --path ./locales/de.json --format nested

On this page