|
...
|
...
|
@@ -727,7 +727,7 @@ class Translate |
|
|
|
* @return \Illuminate\Http\Client\Response
|
|
|
|
* @time 2022/3/30 15:58
|
|
|
|
*/
|
|
|
|
public static function translate($texts, $tls)
|
|
|
|
public static function translate($texts, $tls, $sl = 'auto')
|
|
|
|
{
|
|
|
|
$action = 'translates';
|
|
|
|
if (is_string($texts)) {
|
|
...
|
...
|
@@ -738,7 +738,7 @@ class Translate |
|
|
|
}
|
|
|
|
$data = [
|
|
|
|
'texts' => $texts,
|
|
|
|
'sl' => 'auto',
|
|
|
|
'sl' => $sl,
|
|
|
|
'tls' => $tls,
|
|
|
|
];
|
|
|
|
return http_post(self::$url.$action, json_encode($data),self::$header);
|
...
|
...
|
|