I have a JQueryUI modal dialog, and everything works fine, except for one problem ... how can I localize the OK and Cancel buttons? I went through the demo and the documentation, and if I don’t miss something very obvious, I can’t figure out how to do it ...
My code is:
$("#MyDialog").dialog({ . . . buttons: { OK: function () { . . . }, Cancel: function () { . . . } } });
A dialog box appears with two buttons: OK and Cancel. How to get buttons for reading, for example, "Si" and "Cancellare" ..?
What I need to do is be able to INJECT a localized value. Therefore, I need not hardcode "Si" or "Cancellare" in the dialog setup code, but be able to set the OK button to display "OK" or "Si" or any other value depending on the client machine locale.
Everything else in the dialog box works fine.
jquery jquery-ui jquery-ui-dialog
Alfamale
source share