javascript - English translation of Jquery default messages -


i translating 1 project own language, can't find should translate buttons "yes", "no" , "cancel" on jquery

for example, line creates pop when user wants logout:

function logout(){     jqueryconfirmwithtitle('are sure want logout?', 'confirm logout',function() {logoff(false);}); };  function logoff(timeout) {     $('#logofftimeout').val(timeout ? 'true' : 'false');     $('#logoffform').submit(); }; 

where should go translate standard string messages of jquery?

edit: @mikec pointed, not jquery function thought was, looked more deep function , found declared.

function jqueryconfirmwithtitle(confirmtext, titletext, callbackonyes) {     jqueryconfirmwithyesnocallback(confirmtext, titletext, callbackonyes, function() {}); }  function jqueryconfirmwithyesnocallback(confirmtext, titletext, callbackonyes, callbackonno) {     var dlgconfirm = $('#dlgconfirm');     dlgconfirm.empty().html('<p style="font-size: 1.0em;">'+confirmtext+'</p>');     dlgconfirm.dialog({         modal: true,         title: titletext,         buttons: {             yes: function() {                 $( ).dialog("close");                 callbackonyes();             },             no: function() {                 $( ).dialog("close");                 callbackonno();             }         },         open: function() { $(".ui-dialog-titlebar-close").hide(); }     }); } 

you can use 1 of plugins, example: https://github.com/wikimedia/jquery.i18n or https://github.com/recurser/jquery-i18n or https://github.com/coderifous/jquery-localize.

you'll need provide strings in jsons each language.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -