PDA

View Full Version : Months are english. How to change turkish?



winpeace
07-05-2008, 09:14 AM
<script type="text/javascript">
var currenttime = '<?=$current_time_display;?>';
var server_date=new Date(currenttime);

function padlength(what){
var output=(what.toString().length==1)? "0"+what : what;
return output;
}

function displaytime(){
server_date.setSeconds(server_date.getSeconds()+1)
var timestring=padlength(server_date.getHours())+":"+padlength(server_date.getMinutes())+":"+padlength(server_date.getSeconds());
document.getElementById("servertime").innerHTML=timestring;
}

window.onload=function(){
setInterval("displaytime()", 1000);
}

</script>

this scripts shows months language englis.How to convert turkish language
example;
July -> Temmuz

allahverdi
07-05-2008, 10:14 AM
First of all, selam :D

I'm not js expert but i think you can make something like:



if(yourstring = "July"){
var mymonth = "Temmuz";
}


I wish i could help you...

djr33
07-05-2008, 12:57 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

I suggest creating an array with pairs of months (Eng>Tur), then just replacing it when it comes up-- but I don't see where that is in the code you posted.