2017-04-10 1 views
0

두 번들 : 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

나는 항상 옵션을 공란으로 남겨두고 번역은 내가 사용하는 모든 번들에서 사용할 수있다. 나는 그 도메인을 참조해야합니다.

관련 문제