Name

setlocale

Synopsis

string setlocale(mixed category, string 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.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.