ng-extract-i18n
extracts internationalization messages from Angular source code
TLDR
Extract messages to messages.xlf in the project root
$ ng extract-i18n
Extract to specific format$ ng extract-i18n --format [xlf2]
Extract to output path$ ng extract-i18n --output-path [src/locale]
Set the output filename$ ng extract-i18n --output-path [src/locale] --out-file [source.xlf]
Extract for specific project$ ng extract-i18n [my-app]
SYNOPSIS
ng extract-i18n [project] [options]
DESCRIPTION
ng extract-i18n extracts messages marked with the i18n attribute in templates and $localize tagged strings in code, and writes a translation source file for the localization workflow. Translators produce one translated copy per locale, which is then configured in angular.json and merged at build time.Requires the @angular/localize package (ng add @angular/localize).
PARAMETERS
--format format
Output format: xlf (default), xlf2, xmb, json, arb, legacy-migrate. Aliases xlif, xliff, xliff2 are accepted.--output-path path
Output directory.--out-file file
Output filename.-c, --configuration name
Named builder configuration(s) from angular.json, comma-separated.--build-target target
Build target to extract from, as project:target[:configuration].--i18n-duplicate-translation mode
How to handle duplicate messages: error, ignore, warning.--progress
Log progress to the console (default true).
