1

PHP setlocale doesn't work

view story
linux-howto

http://serverfault.com – I try to set the locale from fr_FR to us_US in PHP (php-fpm) with nginX. Here is my code: <?php system('locale -a'); /* C POSIX en_US.utf8 fr_FR fr_FR.iso88591 fr_FR.iso885915@euro fr_FR.utf8 So the en_US locale is well installed */ echo locale_get_default(); /* fr_FR */ echo setlocale(LC_ALL, '0'); /* LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C; LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C; LC_MEASUREMENT=C;LC_IDENTIFICATION=C */ echo setlocale(LC_ALL, 'en_US.UTF-8', 'en_US.UTF8'); /* setlocale doesn't return anything locale doesn't changed (HowTos)