Symfony2:使用A2lixTranslationFormBundle和Gedmo \DoctrineExtensions呈现翻译形式的问题可翻译 [英] Symfony2: problems rendering the translation-form with A2lixTranslationFormBundle and Gedmo\DoctrineExtensions Translatable
问题描述
我使用 gedmo / doctrine-translations
和 a2lix / translation-form-bundle:2。* @ dev
翻译我的实体。
翻译形式始终呈现 Field 和 Content ,但我的实体本身doesn不包含字段或内容字段。
表单类型 p>
$ builder-> add('translations','a2lix_translations');
2.0
版本的TranslationFormBundle
与当前的 gedmo / doctrine-extensions
版本不兼容。
查看包的 升级说明 。
您需要使用当前不稳定的分支 wip-v2.4.0
和。
解决方案: 要么更新 gedmo / doctrine-extensions ... c $ c> 1.x 版本的a2lix / TranslationFormBundle: 您需要使用 进一步,您需要在options-array中指定可转换的类,如下所示: I'm using The translation form always renders a Field and Content but my entity itself doesn't contain a Field or Content field. The form type
The See the bundle's upgrade notes. You'll need to use the currently unstable branches solution: Either update gedmo/doctrine-extensions ... ... or downgrade your a2lix/translation-form-bundle version:
important notice for the You need to use the Further you need to specify the translatable class in the options-array like this:
这篇关于Symfony2:使用A2lixTranslationFormBundle和Gedmo \DoctrineExtensions呈现翻译形式的问题可翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
composer require gedmo /doctrine-extensions:wip-v2.4.0@dev
作曲家更新gedmo / doctrine-extensions
<
作曲家要求a2lix / translation-form-bundle:〜1.2
作曲家更新a2lix / translation-form-bun dle
a2lix_translations_gedmo
字段类型,如文档
);
gedmo/doctrine-translations
and a2lix/translation-form-bundle: 2.*@dev
to translate my entities.$builder->add('translations', 'a2lix_translations');
2.0
version of the TranslationFormBundle
isn't compatible with the current gedmo/doctrine-extensions
version.wip-v2.4.0
and .
composer require gedmo/doctrine-extensions:wip-v2.4.0@dev
composer update gedmo/doctrine-extensions
composer require a2lix/translation-form-bundle:~1.2
composer update a2lix/translation-form-bundle
1.x
version of a2lix/TranslationFormBundle:a2lix_translations_gedmo
field-type as described in the documentation.$builder->add('translations', 'a2lix_translations_gedmo', array(
'translatable_class' => "Your\Entity"
);