Hi all:
Our legacy system use http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/ as alert dialogs.
I want to localize the text of button on $.prompt(...), which is "Close" by default.
How can I do that? Thanks.
Hi all:
Our legacy system use http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/ as alert dialogs.
I want to localize the text of button on $.prompt(...), which is "Close" by default.
How can I do that? Thanks.
Assuming that you mean the "cancel" button,
$('#popup_cancel').val('Schliessen');
var Language = function()
{
var _locale = 'en_US';
var _langs = {}
var SetLocale = function(locale){_locale = locale}
var Add = function(k,v,locale)
{
//Add to _langs
}
var Get = function(key)
{
//Return the key out of _langs
}
}
$.locale = new Language();
$.locale.SetLocale(navigator.language || navigator.userLanguage);
$.Add('cancel','Cancel','en_US');
$.Add('cancel','GermanCancel','es_GR');
$.prompt($.locale.Get('cancel'));
Some Resources: