首先开启php.ini中的php_intl.dll,重启Apache,运行示例代码:
$price = 100; echo \Yii::t('app', 'Price: {0, number, currency}', $price);
报错如图:
具体的知识背景,不做阐述,有兴趣可以去以下连接下学习了解:
https://www.ibm.com/developerworks/cn/opensource/os-icu4c2/
http://php.net/manual/zh/book.intl.php
http://www.yiichina.com/doc/guide/2.0/tutorial-i18n
开始处理解决问题:
http://apps.icu-project.org/icu-jsp/downloadPage.jsp?ver=57.1&base=c&svn=release-57-1
然后将icu**57.dll文件共 7份文件,复制到对应的php版本的目录下 ,重启Apache看结果!
相关文章:
,请先登录查看所有评论- 处理Yii2.0在lnmp环境下500错误 2018-04-02
- Yii2.0-多域名共享Cookie的增删改查 2018-03-14
- The filename 1.xlsx is not recognised as an OLE file 2017-12-06
- Yii默认目录结构解析(1.1.15) 2015-05-27
- Yii的Gii无法登陆 2015-05-27
网友评论已关闭