See if the locale is installed in your server.
You can list all the locale in your server by issuing the command
locale -a
Install your locale. Indonesian locale, I believe is
id_ID
by issuing the command. The list of locale is obtained from this answer https://stackoverflow.com/a/28357857/5808894sudo locale-gen id_ID
sudo update-locale
Set locale using the method setlocale
setlocale(LC_TIME, 'id_ID');
Either use Carbon or strftime to output the localized date
strftime("%a %d %b %Y", strtotime(date('Y-m-d')))
OR
Carbon\Carbon::parse('23-03-2017 11:23:45')->formatLocalized('%A %d %B %Y');
outputs Kamis 23 Maret 2017
Referensi lengkap Medium
0 Komentar