php5 intl 1.1.2 LOCALE configuring / not working properly

2.1k Views Asked by At

I had a copy of PHP 5.2.17 (running on Debian) without intl extension installed on my server. I followed Howto: build and install the intl PECL extension for PHP5 in Debian guide and got it installed, however the Locale class is still not working properly.

  • Locale::DEFAULT_LOCALE; is NULL.
  • setlocale(LC_TIME, 'en_US', 'fr_FR.UTF8', 'fr.UTF8', 'fr_FR.UTF-8', 'fr.UTF-8') is false

If I setup ini_set('intl.default_locale', 'cs_CZ'); and call Locale::DEFAULT_LOCALE; on the next line then the result is NULL again.

PHPInfo is says:

intl.default_locale = no value
intl.error_level    = 0
1

There are 1 best solutions below

1
On

Installing PHP 5.3 and updating list of available locales with locales-all package (thank you for that package!) solved the problem.