How to set source language for @angular/localize
After you’ve installed @angular/localize
, you can set the source language in angular.json
: Add
"i18n": {
"sourceLocale": "de",
},
to your project, for example:
[...]
"projects": {
"MyApplication": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "sass"
}
},
"i18n": {
"sourceLocale": "de",
"locales": {
"en": "src/locale/messages.en.xlf"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
[...]