setlocale
Setting the locale information
setlocale()
function sets the region information (region information).
Regional information is the language, currency, time and other information for a geographical area.
Note: setlocale()
function changes region information only for the current script.
Tip: You can set the region information to the system default through setlocale(LC_ALL,NULL)
.
Tip: If you want to obtain numeric format information, please refer to localeconv()
function.
Set the region to US English, and then reset it back to the system default:
<?php echo setlocale ( LC_ALL , "US" ) ; echo "<br>" ; echo setlocale ( LC_ALL , NULL ) ; ?>
Try it yourself