PHP » GoLang |
login |
register |
about
|
setlocale(PHP 4, PHP 5, PHP 7) setlocale — Set locale information Description
string setlocale
( int
$category
, string $locale
[, string $...
] )
string setlocale
( int
$category
, array $locale
)Sets locale information. Parameters
Return Values
Returns the new current locale, or An invalid category name also causes a warning message. Category/locale names can be found in » RFC 1766 and » ISO 639. Different systems have different naming schemes for locales.
Changelog
Examples
Example #1 setlocale() Examples
<?php
Example #2 setlocale() Examples for Windows
<?php NotesWarning
The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS, HHVM or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale(). Tip
Windows users will find useful information about
|
more
Recently updated
more
Most requested
more
Last requests
|