The problem is I have this piece of code (Jquery UI):
$("#dialog-confirm").dialog({
resizable: false,
modal: true,
buttons: {
"Remove": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
and now I have to internationalize it by giving to each button a word translation. I have the translation on the variables STR_REMOVE and STR_CANCEL, but if I do something like
buttons: {
STR_REMOVE: function() {
$(this).dialog("close");
},
STR_CANCEL: function() {
$(this).dialog("close");
}
}
the buttons (the properties) take the value “STR_REMOVE” and “STR_CANCEL”, not its content. So, the question is, what can I do?
Try this.
have a look at the jquery ui doc: http://jqueryui.com/demos/dialog/#option-buttons