Hướng dẫn php setlocale not working
(PHP 4, PHP 5, PHP 7, PHP 8) setlocale — Set locale information Descriptionsetlocale(int Alternative signature (not supported with named arguments): setlocale(int Warning The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API , 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(). On Windows, locale information is maintained per thread as of PHP 7.0.5. Parameterscategory
locales If If If rest Optional string parameters to try as locale settings until success. locale_array Each array element is tried to be set as new locale until success. This is useful if a locale is known under different names on different systems or for providing a fallback for a possibly not available locale.
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.
ExamplesExample #1 setlocale() Examples
Example #2 setlocale() Examples for Windows
Notesr dot nospam dot velseboer at quicknet dot nospam dot nl ¶ 20 years ago
russ at eatmymonkeydust dot com ¶ 10 years ago
= explode(";", setlocale(LC_ALL, 0)); epistomai at gmail dot com ¶ 3 years ago
Shashakhmetov Talgat ¶ 6 years ago
brice/axice/be ¶ 13 years ago
putenv('LANG='.$lang.'.'.$codeset);
Kari Sderholm aka Haprog ¶ 13 years ago
pigmeu at pigmeu dot net ¶ 17 years ago
jose dot nobile at gmail dot com ¶ 7 years ago
Periklis ¶ 15 years ago
Sven K ¶ 16 years ago
Leigh Morresi ¶ 13 years ago
RobQuist ¶ 8 years ago
$skipConstants = array( //these will be returned by setlocale(LC_ALL, 0), but don't exist anymore. Anonymous ¶ 16 years ago
bryn AT lunarvis DOT com ¶ 14 years ago
tomas dot hampl at gmail dot com ¶ 11 years ago
divinity76 at gmail dot com ¶ 2 months ago
birkholz at web dot de ¶ 17 years ago
lingureanumanuel at yahoo dot com ¶ 7 months ago
mk at totu dot com ¶ 18 years ago
Un_passant ¶ 13 years ago
tim dot peters at live dot com ¶ 3 years ago
setlocale(LC_ALL, 0); stepdate at gmail dot com ¶ 4 years ago
internationalist ¶ 6 years ago
aaaaa976 at gmail dot com ¶ 7 years ago
phcorp ¶ 11 years ago
leif at neland dot dk ¶ 12 years ago
michal dot kocarek at brainbox dot cz ¶ 14 years ago
szepeshazi at gmail dot com ¶ 15 years ago
garygendron at yahoo dot com ¶ 12 years ago
mvanbaak ¶ 15 years ago
ostapk ¶ 14 years ago
|