Vishalraj Jadeja
Vishalraj Jadeja

Reputation: 5

Hi is there any way to put a variable in the translate syntax of i18n ejs

  let item_name = booking.item_name

  $('#show_item_name').text("<%= __('"+itemname+"')%>")

I have this code in which i want to put dynamic variable in the i18n translation syntax because the variable can have any string. I tried to put the codes and add vaiable but it gives me error like this in html &#34+itemname+&#34 Please if anyone can help me out with how to put the quotes or any other way.

Upvotes: -1

Views: 20

Answers (0)

Related Questions