/** * Sets the translation for a given locale * * @param $translation The translation object * @param string $locale Locale to use for the translation, e.g. 'fr_FR' * * @return The current object (for fluent API support) */ public function setTranslation($translation, $locale = '') { $translation->set($locale); $this->add($translation); $this->currentTranslations[$locale] = $translation; return $this; }