The pull command downloads all completed translations and writes them as JSON files to your locales directory.
Usage
npx lazylocales pull [options]
Options
| Flag | Description |
|---|
--dry-run | Show files that would be written without downloading |
--json | Output machine-readable JSON |
What it does
Fetch locale status
Queries the API for all configured locales and their translation status.
Download completed translations
Downloads the translated JSON content for each locale with status complete.
Write locale files
Writes each translation to the localesDir path as {locale}.json:┌─────────┬──────────────┬────────────────────────────┬────────┐
│ Locale │ Language │ File │ Keys │
├─────────┼──────────────┼────────────────────────────┼────────┤
│ nl-NL │ Dutch │ public/locales/nl-NL.json │ 142 │
│ fr-FR │ French │ public/locales/fr-FR.json │ 142 │
│ de │ German │ public/locales/de.json │ 142 │
└─────────┴──────────────┴────────────────────────────┴────────┘
Examples
Download all completed translations:
Preview files that would be written:
npx lazylocales pull --dry-run
If no completed translations are found, the CLI will suggest running
lazylocales translate first.