Definition and usage
nl_langinfo()
function returns specific local information.
Note: This function is not applicable to Windows platforms.
Tip: Unlike the localeconv()
function that returns all local format information, nl_langinfo()
function returns specific information.
grammar
nl_langinfo ( element )
parameter |
describe |
element
|
Required. Specifies which element to return. Must be one of the following elements:
Time and calendar:
- ABDAY_(1-7) - Abbreviation name for each day of the week
- DAY_(1-7) - Name that represents every day of the week (DAY_1 = Sunday)
- ABMON_(1-12) - Abbreviation name for each month of the year
- MON_(1-12) - Name of each month of the year
- AM_STR - String representing morning
- PM_STR - String representing afternoon
- D_T_FMT - A format string representing time and date that can be used for strftime()
- D_FMT - A format string representing a date that can be used for strftime()
- T_FMT - A format string representing time that can be used for strftime()
- T_FMT_AMPM - A format string that represents a 12-hour time with an AM/PM time that can be used for strftime()
- ERA - Century Conversion
- ERA_YEAR - Century conversion format expressed in year
- ERA_D_T_FMT - Century conversion format expressed in date and time (strftime() strings)
- ERA_D_FMT - a century-converted format expressed as date (a string that can be used in strftime())
- ERA_T_FMT - a century-converted format expressed in time (a string that can be used in strftime())
Currency Category:
- INT_CURR_SYMBOL - Currency symbol (for example: USD)
- CURRENCY_SYMBOL - Currency symbol (example: $)
- CRNCYSTR - Similar to CURRENCY_SYMBOL
- MON_DECIMAL_POINT - Currency decimal character
- MON_THOUSANDS_SEP - Currency Thousand Separator
- POSITIVE_SIGN - Positive character
- NEGATIVE_SIGN - Negative value characters
- MON_GROUPING - Displays an array of currency numbers in the form of combinations (for example: 1 000 000)
- INT_FRAC_DIGITS - International Common Decimal places
- FRAC_DIGITS - Local universal decimal places
- P_CS_PRECEDES - True(1) if the currency symbol is displayed before a positive value, False(0) if it is displayed after a positive value
- P_SEP_BY_SPACE - True(1) if there is space between the currency symbol and a positive value, otherwise False(0)
- N_CS_PRECEDES - True(1) if the currency symbol is displayed before a negative value, False(0) if it is displayed after a negative value
- N_SEP_BY_SPACE - True(1) if spaces are included between currency sign and negative values, otherwise False(0)
- P_SIGN_POSN - Format setting, possible return values:
- 0 - Write quantity and currency symbols in parentheses
- 1 - Add a + sign before the quantity and currency symbols
- 2 - Add + after the quantity and currency symbols
- 3 - Add + directly before the currency symbol
- 4 - Add + sign directly after the currency symbol
- N_SIGN_POSN - Format setting, possible return values:
- 0 - Write quantity and currency symbols in parentheses
- 1 - Add - sign before quantity and currency symbols
- 2 - Add the - number after the quantity and currency symbols
- 3 - Add the - number directly before the currency symbol
- 4 - Add the - number directly after the currency symbol
Number Category:
- DECIMAL_POINT - decimal characters
- RADIXCHAR - Similar to DECIMAL_POINT
- THOUSANDS_SEP - Thousands Separated Characters
- THOUSEP - Similar to THOUSANDS_SEP
- GROUPING - Display arrays in combination of numbers (for example: 1 000 000)
Communication Category:
- YESEXPR - Regex string matching the 'yes' input
- NOEXPR - Regex string matching the 'no' input
- YESSTR - Output string for 'yes'
- NOSTR - Output string for 'no'
Code Set Category:
- CODESET Returns a string with a character encoding name.
|