Reputation: 5
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 "+itemname+" Please if anyone can help me out with how to put the quotes or any other way.
Upvotes: -1
Views: 20