Remove the specified translation from all the Versions of a Content Object.

@param int $contentId
@param string $languageCode language code of the translation
552090
public function deleteTranslationFromContent($contentId, $languageCode)
    {
        try {
            return $this->innerGateway->deleteTranslationFromContent($contentId, $languageCode);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
352291
public function removeTranslations($translationId)
    {
        return $this->createQueryBuilder('t')
            ->delete()
            ->where('t.translationId = :translationId')
            ->setParameter('translationId', $translationId)
            ->getQuery()
            ->execute();
    }
993308
function guid( $contentObject, $languageCode = '' )
    {
        if ( !$contentObject instanceof eZContentObject )
            return md5( self::installationID() . '-' . $contentObject . '-' . $languageCode );

        return md5( self::installationID() . '-' . $contentObject->attribute( 'id' ) . '-' . $languageCode );
    }
199586
public static function languageCountryLocaleCode($languageCode, $countryCode)
    {
        $countryLocaleCodes = static::countryLocaleCodes($countryCode);
        $languageLocaleCodes = static::languageLocaleCodes($languageCode);
        if ($localeCodes = array_intersect($languageLocaleCodes, $countryLocaleCodes)) {
            return reset($localeCodes);
        }

        return \Locale::composeLocale([
            'language' => $languageCode,
            'region' => $countryCode,
        ]);
    }
1007915
static public function removeTranslation( $objectID, $languageIDArray )
    {
        $object = eZContentObject::fetch( $objectID );

        foreach( $languageIDArray as $languageID )
        {
            if ( !$object->removeTranslation( $languageID ) )
            {
                eZDebug::writeError( "Object with id $objectID: cannot remove the translation with language id $languageID!",
                                     __METHOD__ );
            }
        }

        eZContentOperationCollection::registerSearchObject( $objectID );

        eZContentCacheManager::clearContentCacheIfNeeded( $objectID );

        return array( 'status' => true );
    }
544347
public function removeTranslation(\Haven\CmsBundle\Entity\HtmlContentTranslation $translations) {
        $this->translations->removeElement($translations);
    }
1321294
public function removeContentTypeTranslation(int $contentTypeId, string $languageCode): Type
    {
        $type = $this->load($contentTypeId, Type::STATUS_DRAFT);

        unset($type->name[$languageCode]);
        unset($type->description[$languageCode]);

        foreach ($type->fieldDefinitions as $fieldDefinition) {
            $this->contentTypeGateway->removeFieldDefinitionTranslation(
                $fieldDefinition->id,
                $languageCode,
                Type::STATUS_DRAFT
            );

            //Refresh FieldDefinition object after removing translation data.
            $fieldDefinition = $this->getFieldDefinition(
                $fieldDefinition->id,
                Type::STATUS_DRAFT
            );
            unset($fieldDefinition->name[$languageCode]);
            unset($fieldDefinition->description[$languageCode]);
            $storageFieldDefinition = new StorageFieldDefinition();
            $this->mapper->toStorageFieldDefinition($fieldDefinition, $storageFieldDefinition);
            $this->contentTypeGateway->updateFieldDefinition(
                $contentTypeId,
                Type::STATUS_DRAFT,
                $fieldDefinition,
                $storageFieldDefinition
            );
        }

        $updateStruct = $this->mapper->createUpdateStructFromType($type);

        return $this->update($type->id, Type::STATUS_DRAFT, $updateStruct);
    }
1167483
public function deleteTranslationFromContentFields($contentId, array $versions, $languageCode)
    {
        foreach ($versions as $versionInfo) {
            // FT-specific implementations require VersionInfo to delete data
            $fieldTypeIdsMap = $this->contentGateway->getFieldIdsByType(
                $versionInfo->contentInfo->id,
                $versionInfo->versionNo,
                $languageCode
            );

            foreach ($fieldTypeIdsMap as $fieldType => $ids) {
                $this->storageHandler->deleteFieldData($fieldType, $versionInfo, $ids);
            }
        }

        $this->contentGateway->deleteTranslatedFields($languageCode, $contentId);
    }
50311
public function removeEntry($entryId, $language = null)
    {
        $entryId = (string)$entryId;
        foreach ($this->entries as $languageKey => $entries) {
            if ($language && $language !== $languageKey) {
                continue;
            }
            if (isset($this->entries[$languageKey][$entryId])) {
                unset($this->entries[$languageKey][$entryId]);
            }
        }
        return $this;
    }
106516
public function removeReverseFieldRelations($contentId)
    {
        try {
            return $this->innerGateway->removeReverseFieldRelations($contentId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
179163
public function deleteContent(int $content_id, array $args = [])
    {
        $this->getDriver()->content->delete($content_id, $args);
    }
305957
private function removeIdxSiteContentsByUids($siteUid, array $contentUids)
    {
        if (0 < count($contentUids)) {
            $this->getEntityManager()
                    ->createQuery('DELETE FROM BackBee\ClassContent\Indexes\IdxSiteContent i
                        WHERE i.site_uid=:site_uid
                        AND i.content_uid IN (:content_uids)')
                    ->setParameters(array(
                        'site_uid' => $siteUid,
                        'content_uids' => $contentUids, ))
                    ->execute();
        }

        return $this;
    }
829852
public function cleanup($dirty, $languageCode = null)
    {
        $replacers = $this->replacers['default'];

        if (null !== $languageCode) {
            $replacers = array_merge(
                $replacers,
                (isset($this->replacers[$languageCode]) ? $this->replacers[$languageCode] : [])
            );
        }

        if (count($replacers) > 0) {
            foreach ($replacers as $key => $value) {
                $dirty = str_replace($key, $value, $dirty);
            }
        }

        $clean = strtolower($dirty);

        // Inspired by ZOOLU
        // delete problematic characters
        $clean = str_replace('%2F', '/', urlencode(preg_replace('/([^A-za-z0-9 -_\/])/', '', $clean)));

        // replace multiple dash with one
        $clean = preg_replace('/([-]+)/', '-', $clean);

        // remove dash after slash
        $clean = preg_replace('/\/[-]+/', '/', $clean);

        // delete dash at the beginning or end
        $clean = preg_replace('/^([-])/', '', $clean);
        $clean = preg_replace('/([-])$/', '', $clean);

        // remove double slashes
        $clean = str_replace('//', '/', $clean);

        return $clean;
    }
194670
public function deleteSeoAttributesFromLanguage($languageId, $pageId)
    {
        $alSeo = $this->seoRepository->fromPageAndLanguage($languageId, $pageId);
        // Occours when the attributes has been already removed
        if (null === $alSeo) return true;

        $this->set($alSeo);
        $result = $this->delete();
        $this->set(null);

        return $result;
    }
401394
protected function getLanguageCode(ContentType $contentType)
    {
        $contentTypeLanguages = array_keys($contentType->getNames());

        foreach ($this->languages as $languageCode) {
            if (in_array($languageCode, $contentTypeLanguages, true)) {
                return $languageCode;
            }
        }

        return $contentType->mainLanguageCode;
    }
456977
@Override
	public CPDefinitionLocalization removeByCPDefinitionId_LanguageId(
		long CPDefinitionId, String languageId)
		throws NoSuchCPDefinitionLocalizationException {
		CPDefinitionLocalization cpDefinitionLocalization = findByCPDefinitionId_LanguageId(CPDefinitionId,
				languageId);

		return remove(cpDefinitionLocalization);
	}
722132
public function removeTranslation($locale, $domain, $key)
    {
        $unit = $this->findByDomainAndKey($domain, $key);
        $unit->deleteTranslation($locale);
        $this->persist($unit);
    }