Ember/Handlebars:带有参数数组的本地化助手
Ember/Handlebars: Localization Helper with parameter array
我想本地化包含多个占位符的字符串。
例如:
Hello %@1, today is %@2
我想像这样将数组传递给模板中的本地化助手:
{{loc "greetings" myArray}}
但这不起作用,即使 documentation 说它应该。
有效的是
{{loc "greetings" "John" "Monday"}}
但是我收到要显示的数据是一个数组,我不想将每个元素存储在一个单独的变量中。
如何让模板中的 loc 助手处理数据数组?我做错了什么吗?
这里的人怎么会倒下:
他在这里得到了答案:https://github.com/emberjs/ember.js/issues/16337
Loc
应该 be/will be/is 弃用
我想本地化包含多个占位符的字符串。
例如:
Hello %@1, today is %@2
我想像这样将数组传递给模板中的本地化助手:
{{loc "greetings" myArray}}
但这不起作用,即使 documentation 说它应该。
有效的是
{{loc "greetings" "John" "Monday"}}
但是我收到要显示的数据是一个数组,我不想将每个元素存储在一个单独的变量中。
如何让模板中的 loc 助手处理数据数组?我做错了什么吗?
这里的人怎么会倒下:
他在这里得到了答案:https://github.com/emberjs/ember.js/issues/16337
Loc
应该 be/will be/is 弃用