Skip to content

Commit 4e436b0

Browse files
committed
Add setClient method to customize client parameter
1 parent 61b9bf7 commit 4e436b0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/GoogleTranslate.php

+12
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ public function setUrl(string $url): self
150150
return $this;
151151
}
152152

153+
/**
154+
* Set Google Translate client param (webapp, gtx, etc.)
155+
*
156+
* @param string $client Google Translate client param (webapp, gtx, etc.)
157+
* @return GoogleTranslate
158+
*/
159+
public function setClient(string $client): self
160+
{
161+
$this->urlParams['client'] = $client;
162+
return $this;
163+
}
164+
153165
/**
154166
* Set GuzzleHttp client options.
155167
*

0 commit comments

Comments
 (0)