src/Carbon/Translator.php
public function setMessages($locale, $messages)
    {
        $this->loadMessagesFromFile($locale);
        $this->addResource('array', $messages, $locale);
        $this->messages[$locale] = array_merge(
            isset($this->messages[$locale]) ? $this->messages[$locale] : [],
            $messages
        );

        return $this;
    }
public function setMessages($locale, $messages)
    {
        $this->loadMessagesFromFile($locale);
        $this->addResource('array', $messages, $locale);
        $this->messages[$locale] = array_merge(
            isset($this->messages[$locale]) ? $this->messages[$locale] : [],
            $messages
        );

        return $this;
    }
public function setMessages ( $ locale , $ messages ) { $ this -> loadMessagesFromFile ( $ locale ) ; $ this -> addResource ( 'array' , $ messages , $ locale ) ; $ this -> messages [ $ locale ] = array_merge ( isset ( $ this -> messages [ $ locale ] ) ? $ this -> messages [ $ locale ] : [ ] , $ messages ) ; return $ this ; }
Set messages of a locale and take file first if present.

@param string $locale
@param array  $messages

@return $this
Set messages of a locale and take file first if present .