저는 다국어 응용 프로그램 사이트를 만들고 싶습니다. 그래서 나는 번역이 가능하고 다른 번들을 보았습니다. 내가 번역 및 a2lix 사용sf 2.6 A2LiX entityTranslation을 찾지 못했습니다
는 ... 그래서 문서를 읽을 수 있지만 내가 a2lix를 사용하려고하면,이 오류 메시지가 : 난 그렇게 엔티티> 번역과 같은 하위 폴더에 내 entityTranslation을 설정
Class c2c\AppBundle\Entity\PeriodTranslation does not exist 500 Internal Server Error - ReflectionException
> MyEntityTranslation
a2lix에게 내 하위 폴더를 들여다 볼 수있는 방법이 있습니까?
도움 주셔서 감사합니다.
엔티티
namespace c2c\AppBundle\Entity;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Translatable;
/**
* Period
*
* @ORM\Table(name="Periods")
* @ORM\Entity(repositoryClass="c2c\AppBundle\Entity\PeriodRepository")
* @Gedmo\TranslationEntity(class="c2c\AppBundle\Entity\Translation\PeriodTranslation")
*/
class Period implements Translatable
...
엔티티 번역
namespace c2c\AppBundle\Entity\Translation;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation;
/**
* PeriodTranslation is used fo
*
* @author blucas
*/
/**
* @ORM\Table(name="ext_translations_period", indexes={
* @ORM\Index(name="period_translation_idx", columns={"locale", "object_class", "field", "foreign_key"})
* })
* @ORM\Entity(repositoryClass="Gedmo\Translatable\Entity\Repository\TranslationRepository")
*/
class PeriodTranslation extends AbstractTranslation
{
/**
* All required columns are mapped through inherited superclass
*/
}
구성
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
mappings:
gedmo_translatable:
type: annotation
prefix: Gedmo\Translatable\Entity
dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Entity"
alias: GedmoTranslatable
is_bundle: false
...
# Soft Doctrine extendions
stof_doctrine_extensions:
default_locale: en_US
# Only used if you activated the Uploadable extension
# uploadable:
# Default file path: This is one of the three ways you can configure the path for the Uploadable extension
# default_file_path: %kernel.root_dir%/../web/uploads
# Mime type guesser class: Optional. By default, we provide an adapter for the one present in the HttpFoundation component of Symfony
# mime_type_guesser_class: Stof\DoctrineExtensionsBundle\Uploadable\MimeTypeGuesserAdapter
# Default file info class implementing FileInfoInterface: Optional. By default we provide a class which is prepared to receive an UploadedFile instance.
# default_file_info_class: Stof\DoctrineExtensionsBundle\Uploadable\UploadedFileInfo
orm:
default:
# sluggable: true
translatable: true
...
# Give a way to translate form
a2lix_translation_form:
locale_provider: default
locales: [en,fr,nl]
default_locale: en
required_locales: [en]
manager_registry: doctrine
templating: "A2lixTranslationFormBundle::default.html.twig"
@ vardius : 가장 좋은 해결책은 무엇입니까? 새로운 버전의 a2lix 또는 Gedmo 사용? –
번역을 위해 gedmo를 사용하는 것을 권장합니다. 그러나 a2lix와 함께 gedmo 대신 a2lix 번역을 사용해야합니다. – Vardius
Symfony의 새로운 기능으로 개발 중입니다. 내가 gedmo 만 사용한다면, 단순히 다중 폼을 구현할 수있는 방법이 있습니까? 그래서 모든 언어에 대한 양식을 만들 수 있으며 하나만 저장할 수 있습니까? 나쁜 영어로 유감스럽게 생각합니다. –