I need to localize the dates in Laravel (Php)
. I'am using Carbon
for manipulating dates.
Here are some examples and outputs.
EX: 1 (Working correctly)
setlocale(LC_TIME, 'id');
dd(Carbon::now()->formatLocalized('%A %d %B %Y'));
EX: 2 (Not working)
setlocale(LC_TIME, 'zh-TW');
dd(Carbon::now()->formatLocalized('%A %d %B %Y'));
Here the setlocale(LC_TIME, 'zh-TW');
not working correctly as you can see in the output. it should out put something like 星期二
.
What is the problem in here? and How to overcome this? Thank you.
Note: I'am using XAMP
in Windows-8.1
.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire