2017-04-10 9 views
0

私は2つのバンドル:AppBundleAnotherBundleを持っています。他のバンドルからの翻訳をロードするには

私はAppBundleに文字列を変換する必要があります。

{% trans from 'anotherbundle' %}anotherbundle.string{% endtrans %} 

問題は、私はJMSTranslationBundleに変換する文字列を抽出するとき、私はそれを作成することにしたい一方で、ファイルanotherbundle.en.xlfAppBundle/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ディレクトリに翻訳文字列を抽出することができますか?

答えて

0

私は常にオプションを空白のままにしておき、私が使用するすべてのバンドルで翻訳を利用できます。私はドメインを参照するだけです。

関連する問題