src/Zicht/Bundle/MessagesBundle/Entity/Message.php
public function addMissingTranslations($locales)
    {
        foreach ($locales as $localeCode) {
            if (!$this->hasTranslation($localeCode)) {
                $this->addTranslations(new MessageTranslation($localeCode, $this->getMessage()));
            }
        }

        foreach ($this->translations as $translation) {
            $translation->setMessage($this);
        }
    }
public function addMissingTranslations($locales)
    {
        foreach ($locales as $localeCode) {
            if (!$this->hasTranslation($localeCode)) {
                $this->addTranslations(new MessageTranslation($localeCode, $this->getMessage()));
            }
        }

        foreach ($this->translations as $translation) {
            $translation->setMessage($this);
        }
    }
public function addMissingTranslations ( $ locales ) { foreach ( $ locales as $ localeCode ) { if ( ! $ this -> hasTranslation ( $ localeCode ) ) { $ this -> addTranslations ( new MessageTranslation ( $ localeCode , $ this -> getMessage ( ) ) ) ; } } foreach ( $ this -> translations as $ translation ) { $ translation -> setMessage ( $ this ) ; } }
Adds missing translations

@param array $locales
@return void
Adds missing translations