/**
  * {@inheritdoc}
  */
 protected function createResourceRepository($class, EntityManagerInterface $entityManager, ClassMetadata $metadata, ResourceInterface $resource = null)
 {
     if ($resource !== null && is_a($class, TranslatableRepository::class, true)) {
         return new $class($entityManager, $metadata, $resource, $this->getLocaleContext());
     }
     return parent::createResourceRepository($class, $entityManager, $metadata, $resource);
 }