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

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -