O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

setlocale

Synopsis

string setlocale(mixed category, string locale[, string locale, ...])
   string setlocale(mixed category, array locale)

Sets the locale for category functions to locale. Returns the current locale after being set, or false if the locale cannot be set. Any number of options for category can be added (or ORed) together. The following options are available:

LC_ALL (default)

All of the following categories

LC_COLLATE

String comparisons

LC_CTYPE

Character classification and conversion

LC_MONETARY

Monetary functions

LC_NUMERIC

Numeric functions

LC_TIME

Time and date formatting

If locale is 0 or the empty string, the current locale is unaffected.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required