strftime for Indonesia Locale

耗尽温柔 提交于 2019-12-02 06:37:56

问题


I am using strftime function of php to get time according to my set locale. So for Indonesian in case of February it is returning 'Pebruari' instead of "Februari".

Suggest what to do ?


回答1:


Please try this:

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

This will return you "Februari"...




回答2:


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.



来源:https://stackoverflow.com/questions/22059495/strftime-for-indonesia-locale

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!