2016-07-26 87 views
0

我正在開發中Symfony3多語言網站與KnpDoctrineExtension和a2lix /翻譯形式的束。A2Lix翻譯形式在Sublime3

我跟着既爲KNP和A2Lix文檔:控制器和實體都OK,但是當我嘗試建立和呈現形式,我得到一個500錯誤

Could not load type "a2lix_translations" 

所有的例子,我發現是從項目Symfony2,所以我想知道這是否與我使用的版本相關的問題。

我裝捆在app \ AppKernel.php

new Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle(), 
new A2lix\TranslationFormBundle\A2lixTranslationFormBundle(), 

,我加入應用中的以下行\ CONFIG \ config.yml

a2lix_translation_form: 
    locale_provider: default 
    locales: [br, it, ru] 
    default_locale: en 
    required_locales: [br, it] 
    manager_registry: doctrine 
    templating: "A2lixTranslationFormBundle::default.html.twig" 

感謝您的關注和爲貴幫幫我。

+0

可以請人只是確認a2lix形式捆綁工作與Symfony3? – chieroz

回答

1

我可以證實,穩定的版本2 *正常工作與KNP主義行爲包和Symfony的3.1。

檢查demo的形式捆綁的作者提供。

0

在SF3你必須添加:

use A2lix\TranslationFormBundle\Form\Type\TranslationsType; 

,然後使用此:

$builder->add('translations', TranslationsType::class); 

代替:

$builder->add('translations', 'a2lix_translations');