0
私は2つのバンドル:AppBundle
とAnotherBundle
を持っています。他のバンドルからの翻訳をロードするには
私はAppBundle
に文字列を変換する必要があります。
{% trans from 'anotherbundle' %}anotherbundle.string{% endtrans %}
問題は、私はJMSTranslationBundleに変換する文字列を抽出するとき、私はそれを作成することにしたい一方で、ファイルanotherbundle.en.xlf
がAppBundle/Resources/translations
ディレクトリ内に作成されていることですAnotherBundle/Resources/translations
ディレクトリにあります。
bin/console translation:extract en --config=app
と私が使用した構成はこれです:
は、私は、このコマンドを使用して翻訳を抽出するにはjms_translation:
configs:
app:
dirs: ["%kernel.root_dir%", "%kernel.root_dir%/../src/AppBundle/"]
output_dir: "%kernel.root_dir%/../src/AppBundle/Resources/translations"
ignored_domains: [routes, FOSUserBundle]
excluded_names: ["*TestCase.php", "*Test.php"]
excluded_dirs: [cache, data, logs, web]
どのように私はJMSTranslationBundleがAnotherBundle
ディレクトリに翻訳文字列を抽出することができますか?