strftime for Indonesia Locale

前端 未结 2 800
没有蜡笔的小新
没有蜡笔的小新 2021-01-25 06:36

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\".

S

相关标签:
2条回答
  • 2021-01-25 07:01

    Please try this:

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

    This will return you "Februari"...

    0 讨论(0)
  • 2021-01-25 07:06

    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.

    0 讨论(0)
提交回复
热议问题