Aurelia 如何在i18n';带参数的t值转换器?
在Aurelia的i18n中,可以通过以下方式使用HTML标记:Aurelia 如何在i18n';带参数的t值转换器?,aurelia,Aurelia,在Aurelia的i18n中,可以通过以下方式使用HTML标记: <span t="[html]title">Title</span> 我需要使用这种语法,因为我需要在这里传递一些参数 甚至有可能吗?这在这里解释 ${'title' | t: {'some':'param'}} // Translation file { "paramstest": "Some text with <strong>{{content}}</strong>"
<span t="[html]title">Title</span>
我需要使用这种语法,因为我需要在这里传递一些参数
甚至有可能吗?这在这里解释
${'title' | t: {'some':'param'}}
// Translation file
{
"paramstest": "Some text with <strong>{{content}}</strong>"
}
// View
<span t="[html]paramstest" t-params.bind="params"></span>
// ViewModel
class MyVM {
params = { content: 'ABC' }
[...]
}