/** * Remove the translation for a given locale * * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * @param ConnectionInterface $con an optional connection object * * @return $this The current object (for fluent API support) */ public function removeTranslation($locale = '', ConnectionInterface $con = null) { if (!$this->isNew()) { ::create() ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale)) ->delete($con); } unset($this->currentTranslations[$locale]); foreach ($this-> as $key => $translation) { if ($translation->get() == $locale) { unset($this->[$key]); break; } } return $this; }