Skip to main content
The translate command is the main workflow command. It pushes your source file, computes a diff, triggers AI translation for changed keys, and downloads the results.

Usage

Options

FlagDescription
--locale <locales...>Only translate specific locales
--dry-runShow changes without calling the API
--jsonOutput machine-readable JSON

What it does

1

Check authentication

Verifies you’re logged in. If not, triggers the login flow automatically.
2

Load configuration

Reads lazylocales.config.json from your project root. If no config exists, runs the interactive setup flow (project creation or linking).
3

Push source file

Reads the source locale file (e.g. en.json) and uploads it to LazyLocales. A diff is computed against the previous version:
Only changed keys are sent for translation.
4

Trigger translation

Starts translation jobs for each target locale. If --locale is specified, only those locales are translated.
5

Poll for progress

Displays live progress bars while translations are running:
6

Download locale files

Writes the translated JSON files to your localesDir:

Examples

Translate all configured locales:
Translate only Dutch and French:
Preview changes without translating:
Output as JSON (for scripting):