教义扩展可翻译与可怜的

When i translate an entity, everything is fine but slug.

My entity:

/**
 * @Gedmo\Translatable
 * @var string
 */
private $slug;

My Orm.yml

slug:
  type: string
  length: 1000
  nullable: false
  gedmo:
    translatable: {}
    slug:
      separator: -
      fields:
        - title

My ext_translations table:

ext_translations table

Title and content successfully translated to given language. Slug is generating over title in posts table. I could not translate slug.

Any idea?

I suggest you to change from Doctrine Extensions to DoctrineBehaviors, because the development of the doctrine extensions has stopped. Also what you want is easily possible with doctrine behaviour:

Your Entity class:

class Entity {

   use ORMBehaviors\Translatable\Translatable;

}

Your EntityTranslation class:

class EntityTranslation {

    use ORMBehaviors\Translatable\Translation;
    use ORMBehaviors\Sluggable\Sluggable;

    /**
     * @var string
     * @ORM\Column(type="text", nullable=true)
     */
    protected $title;

    public function getSluggableFields()
    {
        return [ 'title' ];
    }
}