PHP » PYTHON |
login |
register |
about
|
setlocale(PHP 4, PHP 5) setlocale — Set locale information Description
string setlocale
( int $category
, string $locale
[, string $...
] )
string setlocale
( int $category
, array $locale
)
Sets locale information. Parameters
Return ValuesReturns the new current locale, or FALSE if the locale functionality is not implemented on your platform, the specified locale does not exist or the category name is invalid. 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 or Apache on Windows you may experience sudden changes of locale settings while a script is running although the script itself never called setlocale() itself. This happens due to other scripts running in different threads of the same process at the same time changing the processwide locale using setlocale(). Tip
Windows users will find useful information about locale strings at Microsoft's MSDN website. Supported language strings can be found at » http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp and supported country/region strings at » http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_country_strings.asp. Windows systems support the three letter codes for country/region specified by ISO 3166-Alpha-3, which can be found at this » Unicode website. |
more
Recently updated
more
Most requested
more
Last requests
|