简体   繁体   English

印度尼西亚语言环境的strftime

[英]strftime for Indonesia Locale

I am using strftime function of php to get time according to my set locale. 我正在使用php的strftime函数根据我设置的语言环境获取时间。 So for Indonesian in case of February it is returning 'Pebruari' instead of "Februari". 因此,对于印尼人来说,如果是2月,则返回“ Pebruari”而不是“ Februari”。

Suggest what to do ? 建议该怎么办?

Please try this: 请尝试以下方法:

<?php
setlocale(LC_ALL, 'IND');
echo strftime("Today in Indonesia is %B");
?>

This will return you "Februari"... 这将返回您“ Februari” ...

It seems like Indonesian locale is not installed on the server you are working with. 您正在使用的服务器上似乎未安装印度尼西亚语言环境。

If you have shell access to your server then can you kindly try: 如果您具有对服务器的外壳访问权限,那么可以尝试:

locale -a

And check which locates are installed on your Server. 并检查哪些位置已安装在您的服务器上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM