这是我的步骤
<h2 class="semi-bold text-white" i18n="@@loginSloganLeft">
Let Your Brochures Go Digital
</h2>
运行角度cli
ng xi18n-输出路径语言环境
更改angular.json
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"i18nFile": "src/locale/messages.xlf",
"i18nFormat": "xlf",
"i18nLocale": "en",
"i18nMissingTranslation": "error",
当我运行ng服务器时(使用不带参数的默认生产方式),我看到的是html文本,而不是.xlf文件文本