I have a webpage that uses different languages ββstored in localStorage, and in the jQuery dialog I want the button names 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 is that the button with the text "btn_hello_text" displayed in the dialog box, and not the value included in this variable. I can not understand how to dynamically change the value of the button text, any hints? Thanks.
source share