This should work for you:
var buttons = {};
var okBtn = MyAppli.t('Delete all selected items');
buttons[okBtn] = function() {
$(this).dialog('close');
};
var cancelBtn = MyAppli.t('Cancel');
buttons[cancelBtn] = function() {
$(this).dialog('close');
}
$(el).dialog({
buttons: buttons
});
On Jan 22, 1:35 pm, lphm <[email protected]> wrote:
> Hi !
>
> I would be able to translate text of the buttons in the modal Dialog
> for example.
>
> Unfortunately, I can not provide any function as a key in "buttons"
> Array.
>
> For example, this code does not work :
>
> var cancelBtn = function() {
> return MyAppli.t('Cancel');
> };
> var okBtn = MyAppli.t('Delete all selected items');
>
> With this dictionnary in Dialog constructor options :
> buttons: {
> okBtn: function() {
> $(this).dialog('close');
> },
> cancelBtn: function() {
> $(this).dialog('close');
> }
> }
>
> Thank you in advance for your help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---