i18n-node icon indicating copy to clipboard operation
i18n-node copied to clipboard

The module does work with multiple placeholder in text

Open aidonsnous opened this issue 6 years ago • 0 comments

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.

aidonsnous avatar Mar 02 '19 10:03 aidonsnous