Questions tagged «angular-i18n»

2
如何使用角度9 $ localize复数?
从Angular 9开始,我们可以使用 $localize`Hello ${name}:name:` 对于打字稿代码中的i18n。由于该ng xi18n命令无法检测到字符串,因此仍有一些限制,但是如果将这些文本手动添加到翻译文件中,它将起作用。 该$localize函数在JSDoc的源代码中有很好的文档说明,但是并未解释如何使用复数形式。我的意思是这样的(伪代码): $localize`Hello {${count}, plural, =1 {reader} other {readers}}` 这可能$localize吗?如果是:如何?如果否:Angular如何将此类表达式从HTML编译为TypeScript?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.