php - How to set day of the week in Bulgarian language -
i have show tomorrow's day of week in bulgarian.
shown in english, how set in bulgarian?
<?php $now= new datetime('now'); $date=$now->modify('+1 day'); echo $date->format('l'); //prints saturday
i did array of bulgarian names of days , works, there way setlocale
or else?
datetime format
doesnt support locales, have convert timestamp use strftime
use lc_time in setlocale
change settings time related formats
<?php $now= new datetime('now'); $date=$now->modify('+1 day'); setlocale(lc_time, 'bg'); echo strftime("%a", date_timestamp_get($date));
Comments
Post a Comment