PHP money_format [英] PHP money_format
问题描述
我在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?
推荐答案
来自 PHP .net评论:
如果money_format似乎不是 工作正常,请确保您 定义有效的语言环境.例如, 在Debian上,"en_US"无效 语言环境-您需要"en_US.UTF-8"或 'en_US.ISO-8559-1'.
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'.
这让我很沮丧. Debian在以下位置提供了有效的语言环境列表 /usr/share/i18n/SUPPORTED;找到你的 如果不能正常工作,就在那里.
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.
这篇关于PHP money_format的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!