Download Latest Version v5.3.0 source code.tar.gz (10.8 kB)
Email in envelope

Get an email when there's a new version of Google Translate PHP

Home / v5.1.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2022-11-29 827 Bytes
v5.1.0 source code.tar.gz 2022-11-29 8.6 kB
v5.1.0 source code.zip 2022-11-29 13.0 kB
Totals: 3 Items   22.4 kB 1

As of v5.1.0 concrete exceptions are available in \Stichoza\GoogleTranslate\Exceptions namespace:

  • LargeTextException If the requested text is too large to translate.
  • RateLimitException If Google has blocked you for excessive amount requests.
  • TranslationRequestException If any other HTTP related error occurs during translation.
  • TranslationDecodingException If the response JSON cannot be decoded.

All concrete exceptions are backwards compatible, so if you were using older versions, you won't have to update your code.

TranslationDecodingException extends UnexpectedValueException, while LargeTextException, RateLimitException and TranslationRequestException extend ErrorException that was used in older versions (<5.1.0) of this package.

Finally a good answer to [#70]

Source: README.md, updated 2022-11-29