安装/配置
在线手册:中文  英文

安装

This extension may be installed using the bundled version as of PHP 5.3.0, or as a PECL extension as of PHP 5.2.0. In other words, there are two methods to install the intl extension.

安装此 PECL 扩展相关的信息可在手册中标题为 PECL 扩展的安装章节中找到。更多信息如新的发行版本、下载、源文件、 维护人员信息及变更日志等,都在此处: » http://pecl.php.net/package/intl.

Alternatively, --enable-intl will enable the bundled version while compiling PHP.

If your ICU is installed to a non-standard directory then you might want to specify its location in LD_LIBRARY_PATH environment variable so that dynamic linker can find it:

$ export LD_LIBRARY_PATH=/opt/icu/lib

Otherwise, if PHP and ICU are installed to their default locations, then the additional options to `configure' are not needed.


安装/配置
在线手册:中文  英文

用户评论:

jltupac at hotmail dot com (2013-05-17 05:03:46)

Ubuntu:
sudo apt-get install php5-intl

Epaphus (2013-03-05 10:39:15)

You need to install the library.
yum install libicu-devel
Will get it working with "pecl install intl"

spectrumcat (2013-02-12 22:45:42)

On Fedora 18 "pecl install intl" wasn't working after "yum -y install icu" so I had to run "yum -y install php-intl" instead

xgretsch (2011-04-04 03:46:58)

I'm running on Mac OS X using a MacPorts install. According to this page, my vanilla version of PHP 5.3.5 from MacPorts should include the intl functions by default. As far as I can see from phpinfo(), the MacPorts version did not disable it. However, the functions aren't visible and don't work.
It seems to require an additional:
sudo port install php5-intl
After which everything bursts into life.

易百教程