rush:xhtml;">
Hello World!
使用ng命令产生xlf格式的message.xlf文件
rush:bash;">
$ ng xi18n --output-path src/i18n
命令执行后,生成 src/i18n/messages.xlf 文件
rush:xml;">
oasis:names:tc:xliff:document:1.2">
Hello World!
使用ng命令产生xlf格式的message.xlf文件
命令执行后,生成 src/i18n/messages.xlf 文件
复制message.xlf,message.en.xlf(英文版本) message.zh.xlf中文版本
这个命令执行完毕后,生成了en和zh两种语言版本。http://localhost:4200/en访问英文版本,http://localhost:4200/zh访问中文版本。--bh指定默认版本,http://localhost:4200访问时,跳转到默认版本。
这样就可以执行npm run build-i18n 命令,一次build多个语言版本了。
windows用户命令
package.json脚本
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。