Home  >  Article  >  Backend Development  >  nl_langinfo() function in PHP

nl_langinfo() function in PHP

王林
王林forward
2023-08-30 19:45:071170browse

nl_langinfo() function in PHP

nl_langinfo() function contains information about language and locale settings.

Note - This function does not work on Windows.

grammar

nl_langinfo(ele)

parameter

  • ele - Specifies the element to be returned. Should be any of the following elements -

    • Time and Calendar −

    • ABDAY_(1-7) - Abbreviated name for the numbered day of the week

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

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

    • MON_(1-12) - The name of the numbered month of the year

    • AM_STR - AM string

    • PM_STR - Afternoon

    • D_T_FMT - Can be used as a format string for strftime() to represent time and date

    • D_FMT - A string that can be used as a format string for strftime() to represent a date

    • T_FMT - Can be used as a format string for strftime() to represent time

    • T_FMT_AMPM - Can be used as a format string for strftime() to represent 12-hour time, including AM/PM

    • ERA - The Alternative Era

    • ERA_YEAR - Year in alternate era format

    • ERA_D_T_FMT - Alternate era format for dates and times (strings that can be used in strftime())

    • ERA_D_FMT - Date in alternative epoch format (a string that can be used in strftime())

    • ERA_T_FMT - Time expressed in alternative era format (a string that can be used in strftime())

    • Currency Category −

    • INT_CURR_SYMBOL - Currency symbol (example: USD)

    • CURRENCY_SYMBOL - Currency symbol (example: $)

    • CRNCYSTR - Same as CURRENCY_SYMBOL

    • MON_DECIMAL_POINT - Currency decimal point character

    • MON_THOUSANDS_SEP - Currency thousandth separator

    • POSITIVE_SIGN - Positive character

    • NEGATIVE_SIGN - negative character

    • MON_GROUPING - Array showing how currency numbers are grouped (for example: 1 000 000)

    • INT_FRAC_DIGITS - International decimal places

    • FRAC_DIGITS - local decimal places

    • P_CS_PRECEDES - True (1) if the currency symbol precedes a positive value; False (0) if it follows a positive value

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

    • N_CS_PRECEDES - True (1) if the currency symbol is placed before the negative value, False (0) if it is placed after it

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

    • P_SIGN_POSN - Format settings. Possible return values ​​−

      • 0 - Brackets enclose the quantity and currency symbol

      • 1 - The symbol string is placed before the quantity and currency symbol

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

      • 3 - The symbol string immediately precedes the currency symbol

      • 4 - The symbol string immediately follows the currency symbol

    • N_SIGN_POSN - Format settings. Possible return values ​​−

      • 0 - Brackets enclose the quantity and currency symbol

      • 1 - The symbol string is placed before the quantity and currency symbol

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

      • 3 - The symbol string immediately precedes the currency symbol

      • 4 - The symbol string immediately follows the currency symbol

      Number Category −

    • DECIMAL_POINT - Decimal point character

    • RADIXCHAR - Same as DECIMAL_POINT

    • THOUSANDS_SEP - thousands separator character

    • THOUUSEP - Same as THOUSANDS_SEP

    • GROUPING - Array showing how numbers are grouped

return

nl_langinfo() function returns specific information on success, otherwise returns FALSE.

The Chinese translation of

Example

is:

Example

This function cannot be implemented on Windows platform.

The above is the detailed content of nl_langinfo() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete