{ "id": "cli/extract-i18n", "title": "ng extract-i18n", "contents": "\n
\n
\n mode_edit\n code\n
\n \n\n\n
\n \n CLI\n
\n\n \n
\n

ng extract-i18nlink

\n
\n\n\n \n\n
\n \n

Extracts i18n messages from source code.

\n\n \nng extract-i18n <project> [options]\n\nng i18n-extract <project> [options]\n\nng xi18n <project> [options]\n\n\n\n \n\n \n\n

Arguments

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ArgumentDescriptionValue Type
<project>\n

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

\n\n \n
string
\n\n\n \n\n

Options

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OptionDescriptionValue TypeDefault Value
\n --browser-target\n \n \n

A browser builder target to extract i18n messages in the format of project:target[:configuration]. You can also pass in more than one configuration name as a comma-separated list. Example: project:target:production,staging.

\n\n \n
string
\n --configuration\n \n \n

One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.\nSetting this explicitly overrides the \"--prod\" flag.

\n\n

Aliases: -c

\n
string
\n --format\n \n \n

Output format for the generated file.

\n\n \n
xmb|xlf|xlif|xliff|xlf2|xliff2|json|arb|legacy-migratexlf
\n --help\n \n \n

Shows a help message for this command in the console.

\n\n \n
true|false|json|JSONfalse
\n --i18n-format\n \n \n \n

Deprecated: Use 'format' option instead.

\n\n \n \n

Output format for the generated file.

\n\n \n
xmb|xlf|xlif|xliff|xlf2|xliff2|json|arb|legacy-migratexlf
\n --i18n-locale\n \n \n \n

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

\n\n \n \n

Specifies the source language of the application.

\n\n \n
string
\n --out-file\n \n \n

Name of the file to output.

\n\n \n
string
\n --output-path\n \n \n

Path where output will be placed.

\n\n \n
string
\n --prod\n \n \n \n

Deprecated: Use --configuration production instead.

\n\n \n \n

Shorthand for \"--configuration=production\".\nSet the build configuration to the production target.\nBy 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.

\n\n \n
boolean
\n --progress\n \n \n

Log progress to the console.

\n\n \n
booleantrue
\n\n\n \n
\n
\n\n\n" }