如何翻译默认验证消息


How to translate the default validation message

我在做这个:

//src/Locale/pt_BR/validation.po
msgid "This field cannot be left empty"
msgstr "Este campo não pode ficar em branco"
//config/bootstrap.php
ini_set('intl.default_locale', 'pt_BR');

但是不起作用,我还得做点什么吗?

没有validation域,可翻译的核心消息绑定到cake域。您可以使用I18N外壳来提取所有它们。

http://book.cakephp.org/3.0/en/console-and-shells/i18n-shell.html