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

PHP localeconv() Function

PHP localeconv() Function

PHP String Reference Manual PHP String Reference Manual

Example

Look up numeric formatting information for the US locale:

Run Example »


Definition and Usage

The localeconv() function returns an array containing locale-specific numeric and currency formatting information.

The localeconv() function returns the following array elements:

- 0 - Write the quantity and currency symbol inside parentheses - 1 - Prefix the quantity and currency symbol with a + sign - 2 - Suffix the quantity and currency symbol with a + sign - 3 - Prefix the + sign directly before the currency symbol - 4 - Suffix the + sign directly after the currency symbol - 0 - Write the quantity and currency symbol inside parentheses - 1 - Prefix the quantity and currency symbol with a - sign - 2 - Suffix the quantity and currency symbol with a - sign - 3 - Prefix the - sign directly before the currency symbol - 4 - Suffix the - sign directly after the currency symbol

**Tip:** To define the locale, see setlocale() function in Vue 3.

**Tip:** To view all available language codes, visit ourLanguage Code Reference Manual.


Syntax

localeconv()

Technical Details

Return Value: Returns data for the current locale set by setlocale().
PHP Version: 4.0.5+

PHP String Reference Manual PHP String Reference Manual