What is nl langinfo in PHP

In this article I will explain how the nl_langinfo() function can be used in PHP.
  • 1350

nl_langinfo() function in PHP

  • The nl_langinfo() function is used to return specific local information.
  • The nl_langinfo() function returns the specific information on success, or FALSE on failure.

Syntax

nl_langinfo(element)

Parameter

  • element string is required parameter. determine for return the element. Must be one of the following elements:

    Time and Calendar:

    • ABDAY_(1-7) - It is the abbreviated name of the numbered day of the week.
    • DAY_(1-7) - It is the name of the numbered day of the week.
    • ABMON_(1-12) - It is the abbreviated name of the numbered month of the year.
    • MON_(1-12) - It is the name of the numbered month of the year.
    • AM_STR - It is the string for Ante meridian.
    • PM_STR - It is the string for Post meridian.
    • D_T_FMT - It is the string that can be used as the format string for strftime() to represent time and date.
    • D_FMT - It is the string that can be used as the format string for strftime() to represent date.
    • T_FMT - It is the string that can be used as the format string for strftime() to represent time.
    • T_FMT_AMPM - It is the string that can be used as the format string for strftime() to represent time in 12-hour format with ante/post meridian.
    • ERA - It is the alternate era.
    • ERA_YEAR - It is the year in alternate era format.
    • ERA_D_T_FMT - It is the date and time in alternate era format (string can be used in strftime().
    • ERA_D_FMT - It is the date in alternate era format (string can be used in strftime().
    • ERA_T_FMT - It is the time in alternate era format (string can be used in strftime().

    Monetary Category

    • INT_CURR_SYMBOL - It is the currency symbol.
    • CURRENCY_SYMBOL - It is the currency symbol.
    • CRNCYSTR - It is the same as CURRENCY_SYMBOL.
    • MON_DECIMAL_POINT - It is the monetary decimal point character.
    • MON_THOUSANDS_SEP - It is the monetary thousands separator.
    • POSITIVE_SIGN - It is the positive value character.
    • NEGATIVE_SIGN - It is the negative value character.
    • MON_GROUPING - It is the array displaying how monetary numbers are grouped.
    • INT_FRAC_DIGITS - It is the international fractional digits.
    • FRAC_DIGITS - It is the 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 - It is the 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 - It is the 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.

    Numeric Category

    • DECIMAL_POINT - It is the decimal point character.
    • RADIXCHAR - It is the same as DECIMAL_POINT.
    • THOUSANDS_SEP - It is the separator character for thousands.
    • THOUSEP - It is the same as THOUSANDS_SEP.
    • GROUPING - It is the array displaying how numbers are grouped.

    Messaging Category

    • YESEXPR - It is the regex string for matching 'yes' input.
    • NOEXPR - It is the regex string for matching 'no' input.
    • YESSTR - It is the output string for 'yes'.
    • NOSTR - It is the otput string for 'no'.

    Code set Category

    • CODESET It is the return a string with the name of the character encoding.
You may also want to read these related articles here
 
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.