The nl_langinfo() function returns the specified local information.
Note: This function does not work on Windows platforms.
Tip: Unlike the localeconv() function, which returns all local formatting information, the nl_langinfo() function returns specified information.
nl_langinfo( element )
parameter | describe |
---|---|
element | Required. Specifies which element to return. Must be one of the elements listed below: Time and Calendar: ABDAY_(1-7) - abbreviated name for each day of the week DAY_(1-7) - the name representing each day of the week (DAY_1 = Sunday) ABMON_(1-12) - abbreviated name for each month of the year MON_(1-12) - Name representing each month of the year AM_STR - a string representing the morning PM_STR - a string representing afternoon D_T_FMT - A format string representing a time and date that can be used with strftime() D_FMT - A format string representing a date that can be used with strftime() T_FMT - A format string representing a time that can be used with strftime() T_FMT_AMPM - A format string usable with strftime() representing a time in 12-hour format with AM/PM ERA - Century Change ERA_YEAR - century conversion format expressed as year ERA_D_T_FMT - century conversion format expressed as date and time (string usable in strftime()) ERA_D_FMT - century conversion format expressed as a date (string usable in strftime()) ERA_T_FMT - century conversion format expressed in time (string usable in strftime()) Currency category: INT_CURR_SYMBOL - Currency symbol (example: USD) CURRENCY_SYMBOL - Currency symbol (example: $) CRNCYSTR - similar to CURRENCY_SYMBOL MON_DECIMAL_POINT - Currency decimal point character MON_THOUSANDS_SEP - currency thousands separator POSITIVE_SIGN - positive character NEGATIVE_SIGN - Negative character MON_GROUPING - an array showing monetary numerical combinations (for example: 1 000 000) INT_FRAC_DIGITS - International decimal places FRAC_DIGITS - local common decimal places P_CS_PRECEDES - True (1) if the currency symbol is displayed before a positive value, False (0) if it is displayed after the positive value P_SEP_BY_SPACE - True (1) if there is a space between the currency symbol and the positive numeric value, False (0) otherwise N_CS_PRECEDES - True (1) if the currency symbol is displayed before a negative value, False (0) if it is displayed after the negative value 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 - Write the quantity and currency symbol in parentheses 1 - add a + sign before the quantity and currency sign 2 - add a + sign after the quantity and currency sign 3 - Add the + sign directly before the currency symbol 4 - Add the + sign directly after the currency symbol N_SIGN_POSN - Formatting, possible return values: 0 - Write the quantity and currency symbol in parentheses 1 - Place a - sign before the quantity and currency symbol 2 - add - sign after quantity and currency symbol 3 - Add a - sign directly before the currency symbol 4 - Add a - sign directly after the currency symbol Number categories: DECIMAL_POINT - decimal point character RADIXCHAR - similar to DECIMAL_POINT THOUSANDS_SEP - thousands separator characters THOUSEP - similar to THOUSANDS_SEP GROUPING - an array showing combinations of numbers (for example: 1 000 000) Communication category: YESEXPR - Regex string matching 'yes' input NOEXPR - Regex string matching 'no' input YESSTR - the output string for 'yes' NOSTR - output string for 'no' Code set categories: CODESET Returns a string with the name of the character encoding. |
Return value: | Returns the specified information if successful, or FALSE if failed. |
---|---|
PHP version: | 4.1.0+ |