ng extract-i18n

Extracts i18n messages from source code.

ng extract-i18n <project> [options]

ng i18n-extract <project> [options]

ng xi18n <project> [options]


Argument Description

The name of the project to build. Can be an application or a library.


Option Description

Target to extract from.


A named build target, as specified in the "configurations" section of angular.json. Each named target is accompanied by a configuration of option defaults for that target. Setting this explicitly overrides the "--prod" flag

Aliases: -c

--format= xmb|xlf|xlif|xliff|xlf2|xliff2

Output format for the generated file.

Default: xlf

--help= true|false|json|JSON

Shows a help message for this command in the console.

Default: false

--i18nFormat= xmb|xlf|xlif|xliff|xlf2|xliff2

Deprecated: Use 'format' option instead.

Output format for the generated file.

Default: xlf


Deprecated: Use 'i18n' project level sub-option 'sourceLocale' instead.

Specifies the source language of the application.


Use Ivy compiler to extract translations. The default for Ivy applications.


Name of the file to output.


Path where output will be placed.


Shorthand for "--configuration=production". When true, sets the build configuration to the production target. By default, the production target is set up in the workspace configuration such that all builds make use of bundling, limited tree-shaking, and also limited dead code elimination.


Log progress to the console.

Default: true

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.