当我运行命令时
php app/console translation:extract en --enable-extractor=jms_i18n_routing
我收到以下错误:
[JMS\TranslationBundle\Exception\InvalidArgumentException]
The directory where translations are must be set.
这是包配置:
jms_i18n_routing:
default_locale: it
locales: [it, en]
strategy: prefix
cookie:
enabled: false
这有什么问题吗?
最佳答案
您可以在运行translation:extract
命令时使用--dir
选项定义翻译所在的目录来解决此问题。
For dumping, the bundle provides you with a console command which you can use to update your translation files, or also just to preview all changes that have been made.
更新文件:
php app/console translation:extract de --dir=./src/ --output-dir=./app/Resources/translations
关于php - JmsI18NBundle - 必须设置翻译所在的目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26503788/