我收到了这个奇怪的警告
Locale data for 'en-US' cannot be found. No locale data will be included for this locale
跑步时ng build --configuration=prod --localize
这是我的 angular.json
// omitted
"i18n": {
"sourceLocale": "en-US",
"locales": {
"sr-Latn": {
"translation": "src/locale/messages.sr.xlf",
"baseHref": "/sr/"
}
}
},
// omitted
文档清楚地说明 en-US 是默认导入的。更糟糕的是,当我将 sourceLocale 更改为任何其他语言(比如“de”)时,警告消息就会消失。
手动注册 en-US 语言环境数据也无济于事