1ACC.langcurrency = { 2 3 _autoload: [ 4 "bindLangCurrencySelector", 5 "bindLoction" 6 ], 7 8 bindLangCurrencySelector: function (){ 9 10 $('#lang-selector').change(function(){ 11 $('#lang-form').submit(); 12 }); 13 14 $('#currency-selector').change(function(){ 15 $('#currency-form').submit(); 16 }); 17 18 $('#country-selector').change(function(){ 19 $('#country-form').submit(); 20 }); 21 }, 22 bindLoction: function() 23 { 24 var notLoggedIn =false; 25 notLoggedIn=$('[data-not-logged-in]').length>1; 26 27 if (notLoggedIn) { 28 29 var lang; 30 var languagFound; 31 var supportedLanguage= $('.home-hero').attr("data-language-supported"); 32 //Getting all language from browser 33 var userLang = navigator.languages; 34 if (userLang!==null && $.isArray(userLang)) { 35 for(var i=0;i<userLang.length;i++){ 36 var langData=userLang[i].indexOf("-"); 37 if(langData>1) 38 { 39 languagFound=langData.split("-")[0]; 40 } 41 else{ 42 languagFound=userLang[i]; 43 } 44 if(supportedLanguage.indexOf(languagFound)>-1) 45 { 46 lang=languagFound; 47 break; 48 } 49 } 50 } 51 else { 52 if(userLang!==null &&userLang !==undefined) 53 { 54 lang=userLang.indexOf("-") > -1?userLang.split("-")[0]:userLang; 55 } 56 } 57 $.get(ACC.config.encodedContextPath+"/country?languageCode="+lang, 58 {}). 59 done(function(data) { 60 if(data == null ||data == undefined||data == '') 61 { 62 console.log("country already set or Country not supported."); 63 } 64 else 65 { 66 window.location.href="/"+data; 67 68 } 69 }). 70 fail(function(xht, textStatus, ex) { 71 console.log("Failed countroy location redirection. Error details [" + xht + ", " + textStatus + ", " + ex + "]"); 72 }); 73 } 74 } 75};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.