nl_langinfo() function returns the locale information. nl_langinfo() is used to access individual elements of the locale categories.
localeconv(), which returns all of the elements, nl_langinfo() allows you to select any specific element.
Must be one of the following elements:
[table caption=”Time and Calendar” max-width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Parameter, Description
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()).
[/table]
[table caption=”Monetary Category” max-width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Parameter, Description
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 otherwise 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 otherwise False (0) otherwise
N_CS_PRECEDES, True (1) if currency symbol is placed in front of a negative value otherwise 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 otherwise False (0)
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
[/table]
[table caption=”Numeric Category” max-width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Parameter, Description
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)
[/table]
[table caption=”Messaging Category” max-width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Parameter, Description
YESEXPR, Regex string for matching ‘yes’ input
NOEXPR, Regex string for matching ‘no’ input
YESSTR, Output string for ‘yes’
NOSTR, Output string for ‘no’
[/table]
[table caption=”Code set Category” max-width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Parameter, Description
CODESET, Return a string with the name of the character encoding.
[/table]
This function will returns the specific information on success, or FALSE on failure.
When it comes to children, there’s one universal truth: the right toy can spark imagination, build skills, and make memories…
In today’s digital age, where screens and gadgets dominate our children’s lives, there’s something heartwarming about a well-loved plush toy…
In a world dominated by screens and fast-paced routines, it’s easy to forget the simple magic of a toy in…
In the heart of Delhi’s vibrant streets lies a world where imagination meets innovation — the magical universe of toys.…
When was the last time a toy truly amazed you—not just as a product, but as a thoughtful tool for…
In the digital age, the way we experience childhood has changed, but the essence remains the same—imagination, exploration, and joy.…