function replaceTurkish(text){ var textLower = text.toLowerCase(); var turkish = new Array("ı","ğ","ü","ş","i","ö","ç","I","Ğ","Ü","Ş","İ","Ö","Ç"); var english = new Array("i","g","u","s","i","o","c","i","g","u","s","i","o","c"); for (var i = 0; i < textLower.length; i++){ for(var j = 0; j < 14; j++){ if((textLower.charAt(i)) == turkish[j]){ textLower= textLower.replace((textLower.charAt(i)), english[j]); } } } return textLower; }