Skip to content

extract

Terminal window
localive extract [options]
OptionDefaultDescription
--source <path>srcSource root directory to scan
--jsonfalseOutput structured JSON

Returns an ExtractResult with:

  • cwd — working directory
  • files — list of scanned source files
  • keys — sorted array of unique translation keys
PatternMatches
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()].keyNameAngular service access
Terminal window
# Extract from default source directory
localive extract
# Extract from custom directory
localive extract --source packages/app/src
# Output as JSON for CI integration
localive extract --json