extract
localive extract [options]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--source <path> | src | Source root directory to scan |
--json | false | Output structured JSON |
Output
Section titled “Output”Returns an ExtractResult with:
cwd— working directoryfiles— list of scanned source fileskeys— sorted array of unique translation keys
Supported Patterns
Section titled “Supported Patterns”| Pattern | Matches |
|---|---|
t('key') | Generic t() function calls |
data-i18n-key="key" | HTML attribute |
[attr.data-i18n-key]="'key'" | Angular attribute binding |
v-localive-tag="'key'" | Vue directive |
translations()[currentLocale()].keyName | Angular service access |
Examples
Section titled “Examples”# Extract from default source directorylocalive extract
# Extract from custom directorylocalive extract --source packages/app/src
# Output as JSON for CI integrationlocalive extract --json