【发布时间】:2014-07-10 23:28:27
【问题描述】:
我有 PHP 5.5.9 并且我激活了php_intl.dll exyention 并在活动的 php.ini 中将其配置设置为如下:
[intl]
intl.default_locale = ar
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
当我尝试以下树枝代码时:
{{ item.get_date('j F Y | g:i a')|localizeddate('medium', 'none', locale) }}
我遇到了一个致命错误:
致命错误: 未捕获的异常 'Twig_Error_Syntax' 带有消息“第 53 行的“index.html”中不存在过滤器“localizeddate”' 在
官方文档there 没有显示如何安装或添加这个过滤器到树枝。我使用没有 Symfony 的简单 PHP 应用程序。树枝版 1.16.0
【问题讨论】:
标签: php twig template-engine