Skip to content

Commit

Permalink
fixup! docs(aio): Upgrade example dependencies to Angular V6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed May 7, 2018
1 parent e12f469 commit 4e72d3c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions aio/content/guide/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ You also need to instruct the AOT compiler to use your translation configuration
* `i18nFormat`: the format of the translation file.
* `i18nLocale`: the locale id.

<code-example format="." language="ts">
```
"configurations": {
...
"fr": {
Expand All @@ -694,17 +694,20 @@ You also need to instruct the AOT compiler to use your translation configuration
...
}
}
</code-example>
```

You then pass the configuration with the `ng serve` or `ng build` commands. The example below shows how to serve the French language file created in previous sections of this guide:
You then pass the configuration with the `ng serve` or `ng build` commands.
The example below shows how to serve the French language file created in previous
sections of this guide:

<code-example language="sh" class="code-shell">
ng serve --configuration=fr
</code-example>

For production builds, you define a separate `production-fr` build configuration in your `angular.json`.
For production builds, you define a separate `production-fr` build configuration in
your `angular.json`.

<code-example format="." language="ts">
```
"configurations": {
...
"production-fr": {
Expand All @@ -731,7 +734,7 @@ For production builds, you define a separate `production-fr` build configuration
},
...
}
</code-example>
```

The same configuration options can also be provided through the CLI with your existing `production` configuration.

Expand Down Expand Up @@ -781,15 +784,15 @@ compilation, the app will fail to load.

You specify the warning level in the `configurations` section your Angular CLI build configuration. The example below shows how to set the warning level to error:

<code-example format="." language="ts">
```
"configurations": {
...
"fr": {
...
"i18nMissingTranslation": "error"
}
}
</code-example>
```

If you use the JIT compiler, specify the warning level in the compiler config at bootstrap by adding
the 'MissingTranslationStrategy' property. The example below shows how to set the warning level to
Expand Down

0 comments on commit 4e72d3c

Please sign in to comment.