Tuesday, 20 August 2013

How to enable PHP Locale class

How to enable PHP Locale class

I am using PHP 5.4.18 and am trying to use the Locale object.
I have tried the following calls:
$locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
$locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
I get the errors 'Call to undefined function' and 'Class Locale not fund',
respectively.
I found a mention somewhere that the php_intl extension needs to be
enabled. I did this.
I've also looked at the Locale
Manual(http://www.php.net/manual/en/class.locale.php), but there is not
mention of needing to enable anything.
What preparation do I need to undergo to enable the Locale class?
Okie. I found that the php_intl file is not loading. However, it is
present in the php/ext directory and the path it shows in the error log is
correct.
As a note: I am using WAMP.

No comments:

Post a Comment