php - can't get date in german language

前端 未结 4 1939
再見小時候
再見小時候 2021-01-18 07:19

I try to display a date in German but it doesn\'t work. I\'m using PHP with XAMPP.

These are my approaches:

function get_Datetime_Now() {
setlocale (         


        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 07:51

    You can try with :

    setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8');
    echo strftime("%A, %d. %B %Y");
    

    worked for me

提交回复
热议问题