在PHP中,月份名称没有显示为德语?
嗨,我试图用PHP显示月份名称,但它没有用德语显示 在MYSQL中,我的日期显示为在PHP中,月份名称没有显示为德语?,php,mysql,Php,Mysql,嗨,我试图用PHP显示月份名称,但它没有用德语显示 在MYSQL中,我的日期显示为2021-01-23,我使用PHP函数Month(),Month(beginn) PHP代码- date_default_timezone_set('Europe/Berlin'); setlocale(LC_ALL, 'de_DE.utf8'); echo (date("F",strtotime($month))); 试试这个 date_default_timezone_set('Euro
2021-01-23
,我使用PHP函数Month(),Month(beginn)
PHP代码-
date_default_timezone_set('Europe/Berlin');
setlocale(LC_ALL, 'de_DE.utf8');
echo (date("F",strtotime($month)));
试试这个
date_default_timezone_set('Europe/Berlin');
$loc=setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu');
echo utf8_encode(strftime("%B",strtotime("2021-06-23")));
将June转换为Juni
编辑:德语中的一些字符是utf8编码的,utf8_编码函数解决它。像
März
在这里尝试第二个和第三个答案: