Dialog buttons label : how to specify their label ?
Hi,
I'm quite new to the jquery.ui, so this may be a dumb question :)
I'm using the dialog widget with some buttons and it works fine.
However, I have the need to customize the label for differents
languages and wanted to do it by passing the localized labels as
string parameters to my function which creates the dialog. Something
like:
function showDialog( url, saveLabel, cancelLabel )
{
$( '#dialog' ).dialog( {
autoOpen : true,
width: 800,
buttons: {
saveLabel: function() {
var form = $( '#dialog' ).find( "form" );
if( form.valid() )
{
form.submit();
}
},
cancelLabel: function() {
$(this).dialog('destroy');
$( '#dialog' ).remove();
}
}
} );
}
But, as you may guess, the labels displayed are "saveLabel" and
"cancelLabel" and not their values.
Can someone tells me if it is possible to achieve that ? I really need
to pass the labels as variables as some of them contains multiples
words and even specials caracters.
Thanks for your answers and for this great library. I really love it
so far !
Gildas