0
我有PHP 5.5.9和我激活php_intl.dll
exyention並在活動php.ini中設置其配置如下:如何安裝twig localizeddate過濾器?
[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) }}
我有一個致命的錯誤:
Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'The filter "localizeddate" does not exist in "index.html" at line 53' in
的官方文檔there不顯示如何安裝或該過濾器添加到枝杈。我使用沒有Symfony的簡單PHP應用程序。樹枝版本1.16.0