docs: update i18n guide for projects that don't use the cli (#21767)

PR Close #21767
This commit is contained in:
Olivier Combe 2018-01-25 09:52:26 +01:00 committed by Alex Eagle
parent ef99126aea
commit 82a791223c
1 changed files with 6 additions and 3 deletions

View File

@ -402,9 +402,12 @@ By default, the tool generates a translation file named `messages.xlf` in the
<div class="l-sub-section"> <div class="l-sub-section">
If you don't use the CLI, you can use the `ng-xi18n` tool directly from the `@angular/compiler-cli` If you don't use the CLI, you have two options:
package, or you can manually use the CLI Webpack plugin `ExtractI18nPlugin` from the * You can use the `ng-xi18n` tool directly from the `@angular/compiler-cli` package.
`@ngtools/webpack` package. For more information, see [i18n in the CLI documentation](https://github.com/angular/angular-cli/wiki/xi18n).
* You can use the CLI Webpack plugin `AngularCompilerPlugin` from the `@ngtools/webpack` package.
Set the parameters `i18nOutFile` and `i18nOutFormat` to trigger the extraction.
For more information, see the [Angular Ahead-of-Time Webpack Plugin documentation](https://github.com/angular/angular-cli/tree/master/packages/%40ngtools/webpack).
</div> </div>