【发布时间】:2021-09-14 04:02:10
【问题描述】:
我正在使用带有 TS 的 vuejs 3。
我在 TS 中这样创建翻译文件:
index.ts:
export default {
'example': 'example',
}
为了以这种方式使用它:
{{ $t('example') }}
现在我想传递一个参数给翻译,例如:
index.ts:
export default {
'hi_man': 'Hi {name}', //where the name is the parameter
}
我该怎么做?
【问题讨论】:
标签: typescript vue.js internationalization vuejs3 vue-i18n