src/TranslateHelper.php
public static function getMessageLang(string $message): string
    {
        $currentLang = file_get_contents(
            static::LANG_DETECT_URL . '
            ?key=' . static::getApiKey() . '
            &text=' . $message . '
            &hint=en,ru'
        );

        return json_decode($currentLang, true)['lang'] ?? $message;
    }
public static function getMessageLang(string $message): string
    {
        $currentLang = file_get_contents(
            static::LANG_DETECT_URL . '
            ?key=' . static::getApiKey() . '
            &text=' . $message . '
            &hint=en,ru'
        );

        return json_decode($currentLang, true)['lang'] ?? $message;
    }
Вернуть язык сообщения

@param string $message

@return string