I am currently using date function to print out today's date. While doing this, I realized that the setlocale function does not work for Korean unfortunately so I am now wondering is there any way to directly translate from English to Korean through one to one mapping.
so currently I have
setlocale(LC_CTYPE, 'ko_KR,eucKR');
$today = date("Y년 m월 d일 l", strtotime('today'));
This prints 2014년 9월 12일 Monday and I would like to change Monday to 월.
So instead of relying on setlocale I want to know if it is possible to directly change this like:
Monday => 월 etc.
I'm guessing that you don't have the korean locale installed on the system that is running the scripts. You can still just append the correct word for the day at the end of your formatted date.
<?php
$days = array(
'일',
'월',
'화',
'수',
'목',
'금',
'토'
);
$today = date("Y년 m월 d일 w", strtotime('today'));
$today = substr_replace($today, $days[substr($today, -1)], -1);
echo $today;
Output (at time of writing):
2014년 09월 12일 금
^ friday