Where to translate Month and Day language, in PHP? I cant found options for this

2 replies
I can showing month and day in php, from this documentation PHP: date - Manual

for example

Code:
Wednesday, 03 March 2012


i want to change it into my language

Code:
Rabu, 03 Maret 2012

or it is best if can like this

Code:
Rabu, 3 Maret 2012



i am using whm and cpanel, cant found options to translate this, maybe i need to edit some files in PHP configuration, but which one, please help guys
#day #found #language #month #options #php #translate
  • {{ DiscussionBoard.errors[5967674].message }}
  • Profile picture of the author baronz
    Try this code:
    <?php
    //Array Hari

    $array_hari = array(1=>'Senin','Selasa','Rabu','Kamis','Jumat', 'Sabtu','Minggu');

    $hari = $array_hari[date('N')];

    //Format Tanggal

    $tanggal = date ('j');

    //Array Bulan

    $array_bulan = array(1=>'Januari','Februari','Maret', 'April', 'Mei', 'Juni','Juli','Agustus','September','Oktober', 'November','Desember');

    $bulan = $array_bulan[date('n')];

    //Format Tahun

    $tahun = date('Y');

    //Menampilkan hari dan tanggal

    echo $hari . "," . $tanggal . $bulan . $tahun;

    ?>
    {{ DiscussionBoard.errors[5968689].message }}

Trending Topics