Skip to content

Commit 85039e0

Browse files
committed
Add docs for setClient() method
1 parent 4e436b0 commit 85039e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ And use:
156156
$tr->setTokenProvider(new MyTokenGenerator);
157157
```
158158

159+
### Translation Client (Quality)
160+
161+
Google Translate has a parameter named `client` which defines quality of translation. First it was set to `webapp` but later google added `gtx` value which results in a better translation quality in terms of grammar and overall meaning of sentences.
162+
163+
You can use `->setClient()` method to switch between clients. For example if you want to use older version of translation algorithm, type `$tr->setClient('webapp')->translate('lorem ipsum...')`. Default value is `gtx`.
164+
159165
### Errors and Exception Handling
160166

161167
Static method `trans()` and non-static `translate()` and `getResponse()` will throw following Exceptions:

0 commit comments

Comments
 (0)