i18n-node
i18n-node copied to clipboard
The module does work with multiple placeholder in text
I have the following text :
"isgood":"{{gender}} is a good person. Tell {{personnalnoun}}."
and I am calling the function that translate in the following format :
let params = {};
params['gender'] = gender=='male'?t(lang,'He'):t(lang,'She');
params['personnalnoun'] = gender=='male'?t(lang,'him'):t(lang,'her');
console.log(t(lang,'isgood',params)); //
THis is giving the following output :
He is a good person. Tell He.
Instead of :
He is a good person. Tell him.