有没有办法将两个参数传递给 i18next 的
const {t} = useTranslation();
?
// translation_en.js
foo: {
cat: 'Cat'
dog: 'Dog'
}
用法
t('cat', 'dog')
目前,这只返回
猫
也许只是将
t
的输出与单个 arg 连接起来?
console.log([
t('cat'),
t('dog')
].join(' '));