Is it feasible to rely on setlocale, and rely on locales being installed?

后端 未结 3 752
走了就别回头了
走了就别回头了 2020-12-19 05:46

I was trying to generate a localized date string with strftime, the placeholder I use is %x. The language/locale is setlocale(LC_ALL, array(\

3条回答
  •  轮回少年
    2020-12-19 05:49

    If my examination of setlocale() is correct, the answer is: No and no. The range of installed locales varies, as does their name, and the availability of a certain locale ultimately cannot be predicted with total certainty.

提交回复
热议问题