Results 1 to 3 of 3

Thread: Months are english. How to change turkish?

  1. #1
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Months are english. How to change turkish?

    Code:
    <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

  2. #2
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    First of all, selam

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

    Code:
    if(yourstring = "July"){
    var mymonth = "Temmuz";
    }
    I wish i could help you...

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •