PHP 货币格式

发布于 2024-10-01 11:27:59 字数 116 浏览 0 评论 0原文

我在 money_format 上使用,第一个参数是 '%n' 以包含美元符号,并且我将区域设置设置为 en_US但它仍然不包括它。为什么?

I'm using on money_format with the first parameter being '%n' to include the dollar sign, and I have the locale set to en_US but it still doesn't include it. Why?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唔猫 2024-10-08 11:27:59

来自 PHP.net 评论

如果 Money_format 似乎不是
工作正常,请确保您
定义有效的语言环境。例如,
在 Debian 上,“en_US”不是有效的
区域设置 - 您需要“en_US.UTF-8”或
“en_US.ISO-8559-1”。

这让我沮丧了一段时间。
Debian 有一个有效的语言环境列表,位于
/usr/share/i18n/SUPPORTED;找到你的
如果它不能正常工作,就在那里。

From the PHP.net comment:

If money_format doesn't seem to be
working properly, make sure you are
defining a valid locale. For example,
on Debian, 'en_US' is not a valid
locale - you need 'en_US.UTF-8' or
'en_US.ISO-8559-1'.

This was frustrating me for a while.
Debian has a list of valid locales at
/usr/share/i18n/SUPPORTED; find yours
there if it's not working properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文