Jump to content
MakeWebGames

Translating $date


PrimeSuspect

Recommended Posts

Hello

Im traslateing codes into my language but sometimes i exprience some noobish problems.When i cannot find a way i write here :)

I want to change dates into my language for example September 14 2010, 2:42:23 am. it shows date as $date in files.But i couldnt find how i translate it.i appreciate if you help me :)

Link to comment
Share on other sites

use this function for day/month Turkish translation

 

<?php
//for Turkish get return today

echo date_tur(date("N"), "day") . ", " . date("j") . " " . returnDate(date("n"), "month") . " " . date("Y");

   function date_tur($num, $tipe){
       $str;
       switch($tipe){
           case "month":
               $month_name = array("", "Ocak", "?ubat", "Mart", "Nisan", "May?s", "Haziran", "Temmuz", "A?ustos", "Eylul", "Ekim", "Kas?m", "Desember");
               $str = $month_name[floor($num)];
               break;
           case "day":
               $day_name = array("", "Pazartesi", "Sal?", "Çar?amba", "Per?embe", "Cuma", "Cumartesi", "Pazar");
               $str = $day_name[floor($num)];
               break;
       }

       return $str;
   }
?>

 

 

wrx

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...