src/Language.php
public static function names($codes)
    {
        // Get mode
        $mode = config('language.mode');

        // Get languages from config
        $languages = config('language.all');

        $array = [];

        // Generate an array with $code as key and $code language as value
        foreach ($codes as $code) {
            $lang_name = 'Unknown';

            foreach ($languages as $language) {
                if ($language[$mode['code']] == $code) {
                    $lang_name = $language[$mode['name']];
                }
            }

            $array[$code] = $lang_name;
        }

        return $array;
    }
public static function names($codes)
    {
        // Get mode
        $mode = config('language.mode');

        // Get languages from config
        $languages = config('language.all');

        $array = [];

        // Generate an array with $code as key and $code language as value
        foreach ($codes as $code) {
            $lang_name = 'Unknown';

            foreach ($languages as $language) {
                if ($language[$mode['code']] == $code) {
                    $lang_name = $language[$mode['name']];
                }
            }

            $array[$code] = $lang_name;
        }

        return $array;
    }
Add names to an array of language codes as [$code => $language].

@param array $codes

@return array