javascript - How can I localize jquery? -
i used jquery datepicker, works fine. workout used local files jquery, localized german output (mittwoch vs wednesday, mai vs may...) fine. i'd use autocomplete. fine jquery, had include online version of jquery, somehow overides local settings. eversgthing works fine, datepicker english again. can localize script or there ger version? tsunami some: code
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> <title>www.olivereikel.de - rem-o reminder online</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="icon" type="image/ico" href="../mainimages/remo_favicon.ico"> <link rel="stylesheet" type="text/css" href="../maincss/styles.css" media="screen , (min-width: 981px)"/> <!-- attribut "print" f�r die pcausgabe --> <link rel="stylesheet" type="text/css" href="../maincss/styles_mobil.css" media="screen , (max-width: 980px)"/> <!-- <link href="../maincss/styles.css" rel="stylesheet" type="text/css" /> --> <link href="../maincss/hamburger.css" rel="stylesheet" type="text/css" /> <!--<link href="../maincss/alphacube.css" rel="stylesheet" type="text/css"> <link href="../maincss/default.css" rel="stylesheet" type="text/css"> <link href="../maincss/manual.css" rel="stylesheet" type="text/css"> --> <!--[if lte ie 7]> <!--<link href="css/patches/patch_my_layout.css" rel="stylesheet" type="text/css" /> --> <![endif]--> <script language='javascript' type='text/javascript'> function wirklichloeschen(formname,quittung) { var antwort = confirm("achtung! mit dem klick auf ok wird der eintrag '"+quittung+"' endgültig aus der datenbank gelöscht! sind sie sicher?") if (antwort==true){ document.formname.submit(); } else { return false; } } </script> <script language='javascript' type='text/javascript'> window.addevent('domready', function(){ $$('input.datepicker').each( function(el){ new datepicker(el); }); }); </script> <script language='javascript' type='text/javascript'> function kategorie_waehlen() { document.kategorie_senden.submit(); } </script> <script language='javascript' type='text/javascript'> function filtern(){ document.filter_senden.submit(); } </script> <script language='javascript' type='text/javascript'> function kategorie_senden() { document.katabschicken.submit(); } </script> <script language='javascript' type='text/javascript'> function vonoderan_senden() { document.katabschicken.submit(); } </script> <script language="javascript" type="text/javascript"> function mm_reloadpage(init) { //reloads window if nav4 resized if (init==true) (navigator) {if ((appname=="netscape")&&(parseint(appversion)==4)) { document.mm_pgw=innerwidth; document.mm_pgh=innerheight; onresize=mm_reloadpage; }} else if (innerwidth!=document.mm_pgw || innerheight!=document.mm_pgh) location.reload(); } mm_reloadpage(true); function mm_openbrwindow(theurl,winname,features) { window.open(theurl,winname,features); } </script> <!--********************tooltip********--> <script type="text/javascript"> <!-- wmtt = null; document.onmousemove = updatewmtt; function updatewmtt(e) { if (wmtt != null && wmtt.style.display == 'block') { var l = screen.availwidth - 550; var t = 20; wmtt.style.left = l + 'px'; wmtt.style.top = t + 'px'; } } function showwmtt(id) { wmtt = document.getelementbyid(id); wmtt.style.display = "block"; } function hidewmtt() { wmtt.style.display = "none"; } --> </script> <!-- //******editor mit formatierung************* of course need adapt next line tiny_mce.js path --> <script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script> <script type="text/javascript" > tinymce.init({ mode : "exact", language : "de", elements : "nachrichtentextfeld" //theme : "simple" //(n.b. no trailing comma, critical experiment later) }); </script > <!-- //----------- autologout------> <script type='text/javascript'> var sek = 600; var timer; function reset() { sek=600; } function countdown() { var restzeit = math.round(sek/60); sek--; document.getelementbyid('restlaufzeit').innerhtml=restzeit; document.getelementbyid('zaehler').style.width = sek/5 + 'px'; if(sek > 0){ timer = settimeout('countdown()',1000); } else{ location.href='logout.php'; } } </script> <!-- <link rel="stylesheet" href="datepicker/jquery-ui.css" /> <script src="./datepicker/jquery-1.8.3.js"></script> <script src="./datepicker/jquery-ui.js"></script> alterdatepicker --> <!-- neuer datepicker --> <script src="./js/jquerymini.js" type="text/javascript"></script> <script src="./js/jquerymini2.js" type="text/javascript"></script> <link rel="stylesheet" href="../maincss/jquerycss.css" type="text/css" media="all" /> <script src="./js/jquery-datepicker-de.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="../maincss/datepicker.css"> </head> <body onload="countdown();init();" onmousemove="reset()" onkeydown="reset();" lang="de-de"><a name="oben"></a> <div id="page_margins"> <div class="headertimo"> <div class="headerlinks"><img src="../mainimages/remo_logo.png" alt="" class="toplogo" border="none"/> </div> <div class='loginkasten'><div class='logintxt'><div class='firmenname'>lizensiert für: <strong>angela merkel krankenhaus</strong><br/> </div>eingelogged: <strong>herr oliver eikel </strong> als <strong>'oleikel'</strong>. <br/>berechtigung: <strong>administrator</strong>.<form method='post' action='logout.php'> <input type='hidden' name='x' value='abmelden'><input type='submit' name='' value='abmelden'></form><br/> </div><br/> <div class='zeitlogoutbox'> nach <span id='restlaufzeit' style='width:auto;'> </span> minuten untätigkeit werden sie automatisch ausgeloggt. <div style='border: 1px solid black; width:121px; padding:3px 3px 3px 3px;float:left;'><div id='zaehler' style='height: 10px; width: 100px; background: #003399; '></div> </div> </div> </div></div> <div class="time"> 25.07.2017</div><!-- <script> function weiterleitung(wohin) { settimeout("location.href='"+wohin+"';",1000); } </script> --> <h2 class='ueberschrift'>neue erinnerung</h2> </h2> <script type="text/javascript"> $(function() {$("#datepicker").datepicker();}); </script> <!-- ************* autotext --> <style> .ui-helper-hidden-accessible { display:none; } ul{list-style: none; border:1px solid grey;width:200px; } input::-webkit-calendar-picker-indicator { opacity: 0; } </style> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $(function () { $("#rowxxx").prop("disabled", true); var projects = [{value: "31",label:"1&1 internet ag - telgte"},{value: "55",label:"abdel ghani emad - telgte"},{value: "53",label:"ahmann jürgen - telgte"},{value: "44",label:"ahmann walter - telgte"},{value: "107",label:"ahmann bianca - telgte"},{value: "42",label:"albrecht sabrina - telgte"},{value: "3",label:"amazon.de - telgte"},{value: "14",label:"bäuerle beate - telgte"},{value: "89",label:"benning charlotte - telgte"},{value: "78",label:"berger karl-heinz - telgte"},{value: "58",label:"borggreve alfred - telgte"},{value: "108",label:"borggreve marco - telgte"},{value: "13",label:"buch.de internetstores ag - telgte"},{value: "91",label:"buchmayr karl-heinz - telgte"},{value: "7",label:"computeruniverse.net gmbh - telgte"},{value: "95",label:"cremann jochen - telgte"},{value: "76",label:"dahmen norbert - telgte"},{value: "65",label:"demmer heinz - telgte"},{value: "9",label:"deutsche post ag - telgte"},{value: "39",label:"diekmannshemke günter - telgte"},{value: "17",label:"diekmannshemke günther - telgte"},{value: "59",label:"dierkes detlev - telgte"},{value: "2",label:"domainfactory gmbh - telgte"},{value: "60",label:"dorgeist theodor - telgte"},{value: "18",label:"edv & büroservice heuer gmbh - telgte"},{value: "23",label:"eikel ludger - telgte"},{value: "87",label:"ernst friedrich - telgte"},{value: "26",label:"füchtenghans august - telgte"},{value: "47",label:"fechner jörg - telgte"},{value: "93",label:"fellenberg peter - telgte"},{value: "111",label:"fichert iris - telgte"},{value: "66",label:"finanzamt warendorf - telgte"},{value: "64",label:"flotmann martin - telgte"},{value: "85",label:"grothaus georg - telgte"},{value: "12",label:"grunden thomas - telgte"},{value: "86",label:"hahn wolfgang - telgte"},{value: "51",label:"harsch martin - telgte"},{value: "79",label:"heitmann rolf - telgte"},{value: "75",label:"holzmüller frank - telgte"},{value: "80",label:"jeschke peter - telgte"},{value: "105",label:"johnson roy - telgte"},{value: "40",label:"kühn mathias - telgte"},{value: "81",label:"kammer reinhard - telgte"},{value: "97",label:"kamphans wolfgang - telgte"},{value: "32",label:"kfw bank - telgte"},{value: "1",label:"kirchner sven - telgte"},{value: "37",label:"kirchner sven - telgte"},{value: "102",label:"kirchner karin - telgte"},{value: "52",label:"kleideiter michael - telgte"},{value: "90",label:"kloppenborg ralf - telgte"},{value: "83",label:"klosterkamp markus - telgte"},{value: "54",label:"kluge oliver - telgte"},{value: "57",label:"koebbert hans-otto - telgte"},{value: "38",label:"kretschmmar gmbh - telgte"},{value: "72",label:"kretzer franz-josef - telgte"},{value: "99",label:"landwehr martin - telgte"},{value: "10",label:"lepper roland - telgte"},{value: "20",label:"möhlmann ralf - telgte"},{value: "100",label:"möllers melanie - telgte"},{value: "69",label:"meyers michael - telgte"},{value: "110",label:"neue benedikt - telgte"},{value: "6",label:"poster xxl ag - telgte"},{value: "70",label:"prinz karuna - telgte"},{value: "96",label:"puga josef - telgte"},{value: "48",label:"rösmann bernd-rainer - telgte"},{value: "25",label:"rüter ludger - telgte"},{value: "36",label:"rickert günther - telgte"},{value: "33",label:"rodenkirchen bernhard - telgte"},{value: "49",label:"rutsch heidrun - telgte"},{value: "84",label:"salger klaus - telgte"},{value: "94",label:"schäfer jutta - telgte"},{value: "16",label:"schabhüser martin - telgte"},{value: "45",label:"schneider norbert - telgte"},{value: "68",label:"schulze helmut - telgte"},{value: "50",label:"schulze helmut - telgte"},{value: "82",label:"schulze zumkley renate - telgte"},{value: "74",label:"schwering herbert - telgte"},{value: "71",label:"spenst julia - telgte"},{value: "103",label:"stein herbert - telgte"},{value: "88",label:"stuppe ludwig - telgte"},{value: "104",label:"thaele-boehnke doris - telgte"},{value: "101",label:"thoholte hubertus - telgte"},{value: "56",label:"tomasello camelo - telgte"},{value: "5",label:"van de vint ian - telgte"},{value: "24",label:"van dijk gustaaf christiaan - telgte"},{value: "67",label:"vartmann michael - telgte"},{value: "98",label:"vogelpohl sylvia - telgte"},{value: "106",label:"vogelsang adolf - telgte"},{value: "61",label:"wegener stefanie - telgte"},{value: "92",label:"weidig peter - telgte"},{value: "77",label:"wessels beate - telgte"},{value: "43",label:"wortmann franjo - telgte"},{value: "11",label:"yello strom gmbh - telgte"},{value: "73",label:"züwerink andré - telgte"},{value: "63",label:"zeisberger julia - telgte"},{value: "34",label:"zschoke caroline - telgte"}]; $("#empfaenger").autocomplete({ minlength: 3, source: projects, focus: function (event, ui) { $("#empfaenger").val(ui.item.label); return false; }, select: function (event, ui) { $("#empfaenger").val(ui.item.label); $("#empfaenger_id").val(ui.item.value); $("#rowxxx").prop("disabled", false); return false; }, selectfirst: true, click: function (event, ui) { if (ui.item == null) { //here null if entered value not match in suggestion list $(this).val((ui.item ? ui.item.id : "")); // $( "#empfaenger_id" ).val( ui.item.value )=""; // $( "#empfaenger" ).val( ui.item.value )=""; document.getelementbyid('rowxxx').disabled = true; } else document.getelementbyid('rowxxx').disabled = false; } }) $("#empfaenger").autocomplete("instance")._rendermenu = function (ul, items) { var = this; $.each(items, function (index, item) { that._renderitemdata(ul, item); }); inp = $("#empfaenger"); if (inp.val() == "") { $("#rowxxx").prop("disabled", true); } else { var found = false; $.each(items, function (idx, item) { if (item.label == inp.val()) { found = true; return false; } else return true; }); if (found) $("#rowxxx").prop("disabled", false); else $("#rowxxx").prop("disabled", true); } }; }); // dies fehlte </script>
the 2 lines:
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
are problem. without datepickers works fine in german, autocomplete doens't work @ all. it, both scripts working, datepicker in english... idea? tsunami
thanks, solved it: how localize jquery ui datepicker? in addition ger version had define vars mon, sat , sun... no works! tsunami
Comments
Post a Comment