symfony的新功能,我安装了Sonata composer require sonata-project/admin-bundle
和翻译器服务composer require symfony/translation
根据symfony手册(manual我加了
# config/packages/framework.yaml
framework:
translator: { fallbacks: ['%locale%'] }
但是当我输入php bin/console cache:clear
时出现错误
*在ParameterBag.php第100行:
您请求的参数“ locale”不存在。*
谢谢您的帮助,
解决添加services.yaml:
parameters:
locale: 'en' (en -> english, it -> italian ecc..)
和在framework.yaml中
framework:
default_locale: '%locale%'
translator:
fallbacks:
- '%locale%'