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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -