There is something on my website that resembles this:
$("#id").html(msg2show).dialog({
//Other attributes
buttons: {
"Yes": function() {//Code},
"No": function() {//Code}
}
});
I am currently working on adding language support to my site. Is there a way for me to dynamically change the text displayed as "Yes" and "No" without having to duplicate any code?
I tried using the following approach, where I replaced the strings above with variable names, but it seems that the variables are being interpreted as string literals rather than their actual values:
var yes = 'Si';
var no = 'No';