Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP nl_langinfo() Function

PHP nl_langinfo() Function


PHP String Reference Manual PHP String Reference Manual


Definition and Usage

The nl_langinfo() function returns specified locale information.

**Note:** This function does not work on Windows platforms.

**Tip:** Unlike localeconv() which returns all locale formatting information, the nl_langinfo() function returns the specified information.


Syntax

nl_langinfo(

element

)

Parameters Description
element Required. Specifies which element to return. Must be one of the elements listed below:

Time and calendar:

  • ABDAY_(1-7) - Abbreviated names of each day of the week
  • DAY_(1-7) - Names of each day of the week (DAY_1 = Sunday)
  • ABMON_(1-12) - Abbreviated names of each month of the year
  • MON_(1-12) - Names of each month of the year
  • AM_STR - String representing AM
  • PM_STR - String representing PM
  • D_T_FMT - Format string usable in strftime() for time and date
  • D_FMT - Format string usable in strftime() for date
  • T_FMT - Format string usable in strftime() for time
  • T_FMT_AMPM - Format string usable in strftime() for 12-hour time with AM/PM
  • ERA - Era conversion
  • ERA_YEAR - Era conversion format expressed as year
  • ERA_D_T_FMT - Era conversion format expressed as date and time (string usable in strftime())
  • ERA_D_FMT - Era conversion format expressed as date (string usable in strftime())
  • ERA_T_FMT - Era conversion format expressed as time (string usable in strftime())
  • Currency categories:

    Numeric categories:

    Messaging categories:

    Codeset categories:

    |

    Technical Details

    Return Value: Returns the specified information on success, or FALSE on failure.
    PHP Version: 4.1.0+

    PHP String Reference Manual PHP String Reference Manual