我使用ZF2(2.2.6)处理多语言Web应用程序。
我已经安装了php5-intl并在php.ini
中启用了它我在我的模块配置中添加了这个:
array(
'type' => 'phparray',
'base_dir' => 'vendor/zendframework/zendframework/resources/languages',
'pattern' => '/fr/Zend_Validate.php',
'text_domain' => 'default'
)
对简单消息的翻译工作,如“值是必需的,不能为空”,但如果文本包含“输入长度少于3个字符”等参数,则不起作用。
答案 0 :(得分:0)
您必须翻译在验证器本身中写入的确切字符串。 3
被替换。如果你look at the source code,你会看到另一个字符串。
TL; DR:翻译The input is less than %min% characters long