I have a webpage that uses different languages stored in localStorage, and on the jQuery dialog I want the names of the buttons to be dynamically changed according to the language, for example :
var btn_hello_text = getLanguageBtnHelloText();
$('#dialog').dialog({
autoOpen: false,
buttons: {
btn_hello_text: function() {
doThings();
}
}
});
The problem here is that the dialog shows a button with the text "btn_hello_text"
and not the value included in the variable itself. I can't figure a way to change the value of the button text dynamically, any hints? Thank you.