I am looking for a way to pass information to angular.json file so that I do not need to repeat build configurations and avoid all the code duplication. I can not explain well so I'll try with an example. So In my angular.jsonunder configurations I have something like
"configurations": {
"de": {
"aot": true,
"i18nLocale": "de",
"i18nFile": "project/src/locale/messages.de.xlf",
"i18nFormat": "xlf"
},
"en-gb": {
"aot": true,
"i18nLocale": "en-gb",
"i18nFile": "project/src/locale/messages.en-gb.xlf",
"i18nFormat": "xlf"
},
"en-us": {
"aot": true,
"i18nLocale": "en-us",
"i18nFile": "project/src/locale/messages.en-us.xlf",
"i18nFormat": "xlf"
},
"es": {
"aot": true,
"i18nLocale": "es",
"i18nFile": "project/src/locale/messages.es.xlf",
"i18nFormat": "xlf"
},
"fr": {
"aot": true,
"i18nLocale": "fr",
"i18nFile": "project/src/locale/messages.fr.xlf",
"i18nFormat": "xlf"
},
"it": {
"aot": true,
"i18nLocale": "it",
"i18nFile": "project/src/locale/messages.it.xlf",
"i18nFormat": "xlf"
},
"pt-br": {
"aot": true,
"i18nLocale": "pt-br",
"i18nFile": "project/src/locale/messages.pt-br.xlf",
"i18nFormat": "xlf"
}
Is there a way to have a variable like lets say i18n and I can use it in angular.json like $i18n :
"configurations": {
"i18n": {
"aot": true,
"i18nLocale": "$i18n",
"i18nFile": "project/src/locale/messages.$i18n.xlf",
"i18nFormat": "xlf"
}
I am not good with english. I hope I explained well using the example for what I am looking for. Thanks in advance.