php nl,PHP函数nl_langinfo介绍



定义和用法

nl_langinfo() 函数返回指定的本地信息。

如果成功,则返回指定的本地信息。如果失败,则返回 false。

语法nl_langinfo(element)

说明

时间和日历:ABDAY_(1-7) - Abbreviated name of the numbered day of the week

DAY_(1-7) - Name of the numbered day of the week (DAY_1 = Sunday)

ABMON_(1-12) - Abbreviated name of the numbered month of the year

MON_(1-12) - Name of the numbered month of the year

AM_STR - String for Ante meridian

PM_STR - String for Post meridian

D_T_FMT - String that can be used as the format string for strftime() to represent time and date

D_FMT - String that can be used as the format string for strftime() to represent date

T_FMT - String that can be used as the format string for strftime() to represent time

T_FMT_AMPM - String that can be used as the format string for strftime() to represent time in 12-hour format with ante/post meridian

ERA - Alternate era

ERA_YEAR - Year in alternate era format

ERA_D_T_FMT - Date and time in alternate era format (string can be used in strftime())

ERA_D_FMT - Date in alternate era format (string can be used in strftime())

ERA_T_FMT - Time in alternate era format (string can be used in strftime())

货币类别:INT_CURR_SYMBOL - Currency symbol (example: USD)

CURRENCY_SYMBOL - Currency symbol (example: $)

CRNCYSTR - Same as CURRENCY_SYMBOL

MON_DECIMAL_POINT - Monetary decimal point character

MON_THOUSANDS_SEP - Monetary thousands separator

POSITIVE_SIGN - Positive value character

NEGATIVE_SIGN -Negative value character

MON_GROUPING - Array displaying how monetary numbers are grouped (example: 1 000 000)

INT_FRAC_DIGITS - International fractional digits

FRAC_DIGITS - Local fractional digits

P_CS_PRECEDES - True (1) if currency symbol is placed in front of a positive value, False (0) if it is placed behind

P_SEP_BY_SPACE - True (1) if there is a spaces between the currency symbol and a positive value, False (0) otherwise

N_CS_PRECEDES - True (1) if currency symbol is placed in front of a negative value, False (0) if it is placed behind

N_SEP_BY_SPACE - True (1) if there is a spaces between the currency symbol and a negative value, False (0) otherwise

P_SIGN_POSN - Formatting setting. Possible return values:0 - Parentheses surround the quantity and currency symbol

1 - The sign string is placed in front of the quantity and currency symbol

2 - The sign string is placed after the quantity and currency symbol

3 - The sign string is placed immediately in front of the currency symbol

4 - The sign string is placed immediately after the currency symbol

N_SIGN_POSN - Formatting setting. Possible return values:0 - Parentheses surround the quantity and currency symbol

1 - The sign string is placed in front of the quantity and currency symbol

2 - The sign string is placed after the quantity and currency symbol

3 - The sign string is placed immediately in front of the currency symbol

4 - The sign string is placed immediately after the currency symbol

数字类别:DECIMAL_POINT - Decimal point character

RADIXCHAR - Same as DECIMAL_POINT

THOUSANDS_SEP - Separator character for thousands

THOUSEP - Same as THOUSANDS_SEP

GROUPING - Array displaying how numbers are grouped (example: 1 000 000)

通信类别:YESEXPR - Regex string for matching yes input

NOEXPR - Regex string for matching no input

YESSTR - Output string for yes

NOSTR - Output string for no

代码集类别:CODESET Return a string with the name of the character encoding.

提示和注释

注释:money_format() 函数无法在 windows 平台上工作。

提示:与返回所有本地格式化信息的 localeconv() 函数不同,nl_langinfo() 返回指定的信息。

本文出自:琅枫个人博客。如需转载请注明出处!

本文出处:"https://www.phpfeng.cn/function/482.html"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值