sync
localive sync [options]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--source <path> | src | Source root directory |
--locale-file <path> | src/locales/*.json | Target locale JSON file(s) |
--source-locale <code> | first locale | Locale to use as source for default values |
--missing-value <empty|source> | empty | Strategy for missing values: empty fills with empty string, source copies from source locale |
Behavior
Section titled “Behavior”- Extracts keys from source files
- Compares against each locale file
- Adds keys found in source but missing from locale file
- Preserves existing key order and formatting
- Does not remove unused keys (use
validateto find them)
Examples
Section titled “Examples”# Sync missing keys using empty valueslocalive sync --locale-file src/locales/fr.json
# Sync using English as source for default valueslocalive sync --locale-file src/locales/fr.json --source-locale en --missing-value source