当使用角-cli时,是否有一种在角2中定位的工具?
我遇到了此链接 (从11月开始),它说“现在,您不能在翻译的应用程序中使用CLI”,所以i18n工具不能在我的应用程序中使用。
还有其他方法将应用程序翻译成不同的语言吗?
(我用的是webpack,而不是系统‘m)
发布于 2017-05-04 15:27:30
关于角型CLI wiki有一个故事,它应该可以帮助您:
https://github.com/angular/angular-cli/wiki/stories-internationalization
从该条中:
当应用程序准备就绪时,您可以使用ng xi18n命令从模板中提取字符串以进行转换。
ng xi18n --output-path src/locale翻译完之后,你就可以服务了:
ng serve --aot --locale fr --i18n-format xlf --i18n-file src/locale/messages.fr.xlf或建造:
ng build --aot --locale fr --i18n-format xlf --i18n-file src/i18n/messages.fr.xlfhttps://stackoverflow.com/questions/43763371
复制相似问题