docs: update i18n doc regarding aot compilation (#24875)
Add missing lines to code example to allow using ng serve with custom i18n configurations. PR Close #24875
This commit is contained in:
parent
1c533c913d
commit
7ebd8e59a8
|
@ -683,15 +683,27 @@ You also need to instruct the AOT compiler to use your translation configuration
|
||||||
* `i18nLocale`: the locale id.
|
* `i18nLocale`: the locale id.
|
||||||
|
|
||||||
```
|
```
|
||||||
"configurations": {
|
"build": {
|
||||||
...
|
...
|
||||||
"fr": {
|
"configurations": {
|
||||||
"aot": true,
|
|
||||||
"outputPath": "dist/my-project-fr/",
|
|
||||||
"i18nFile": "src/locale/messages.fr.xlf",
|
|
||||||
"i18nFormat": "xlf",
|
|
||||||
"i18nLocale": "fr",
|
|
||||||
...
|
...
|
||||||
|
"fr": {
|
||||||
|
"aot": true,
|
||||||
|
"outputPath": "dist/my-project-fr/",
|
||||||
|
"i18nFile": "src/locale/messages.fr.xlf",
|
||||||
|
"i18nFormat": "xlf",
|
||||||
|
"i18nLocale": "fr",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
...
|
||||||
|
"configurations": {
|
||||||
|
...
|
||||||
|
"fr": {
|
||||||
|
"browserTarget": "angular.io-example:build:fr"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue