src/Caching/MessageCachingService.php
protected function getTranslatedMessages(array $messageKeys, $locale)
    {
        $translatedMessages = [];

        foreach ($messageKeys as $key) {
            $translation = Lang::get($key, [], $locale);

            if (is_array($translation)) {
                $flattened = $this->flattenTranslations($translation, $key.'.');
                $translatedMessages = array_merge($translatedMessages, $flattened);
            } else {
                $translatedMessages[$key] = $translation;
            }
        }

        return $translatedMessages;
    }
protected function getTranslatedMessages(array $messageKeys, $locale)
    {
        $translatedMessages = [];

        foreach ($messageKeys as $key) {
            $translation = Lang::get($key, [], $locale);

            if (is_array($translation)) {
                $flattened = $this->flattenTranslations($translation, $key.'.');
                $translatedMessages = array_merge($translatedMessages, $flattened);
            } else {
                $translatedMessages[$key] = $translation;
            }
        }

        return $translatedMessages;
    }
protected function getTranslatedMessages ( array $ messageKeys , $ locale ) { $ translatedMessages = [ ] ; foreach ( $ messageKeys as $ key ) { $ translation = Lang :: get ( $ key , [ ] , $ locale ) ; if ( is_array ( $ translation ) ) { $ flattened = $ this -> flattenTranslations ( $ translation , $ key . '.' ) ; $ translatedMessages = array_merge ( $ translatedMessages , $ flattened ) ; } else { $ translatedMessages [ $ key ] = $ translation ; } } return $ translatedMessages ; }
Returns the translated messages for the given keys.

@param array $messageKeys
@param $locale
@return array The translated messages as [ <message id> => <translation>, ... ]
Returns the translated messages for the given keys .