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