Skip to content

Releases: Stichoza/google-translate-php

v5.2.0

05 Aug 19:47
9429773
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v5.1.4...v5.2.0

v5.1.4

29 Jun 16:18
3e4dbbf
Compare
Choose a tag to compare

What's Changed

  • Replace ${\d} delimiter with #{\d} to resolve currency bugs by @kylemilloy in #202
  • Remove space in the parameters by @Chitzi in #208

New Contributors

Full Changelog: v5.1.3...v5.1.4

v5.1.3

18 Dec 21:48
0d3de08
Compare
Choose a tag to compare
  • Preserving Parameters Feature: Introducing the preserveParameters() method to preserve specific parameters during translation. Users can now retain placeholders like :name or :count within localization files or templating engines, preventing their translation. Usage can be found in preserving parameters section of documentation. - #199. Thanks @kylemilloy 🎉

v5.1.0

29 Nov 21:56
69b5573
Compare
Choose a tag to compare

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

v5.0.1

28 Nov 16:02
f978697
Compare
Choose a tag to compare

Updated package to require PHP 8 as PHP 7.4 reached its end of life yesterday.

  • setOptions() method accepts only arrays, parameter is not nullable anymore. Likelihood of impact in low.
  • Updated PHPUnit and GuzzleHttp dependencies.
  • All properties and parameters are typed.
  • Various bugfixes and improvements.

v4.1.5

05 Aug 11:09
Compare
Choose a tag to compare
  • Switched from webapp client to gtx for better quality of translation. #163, Thanks @henno
  • Added setClient() method to switch between gtx and webapp clients (Default is gtx).

v4.1.4

26 Jan 22:26
9e4808c
Compare
Choose a tag to compare

Preserve HTTP error codes in ErrorException #160 #161

v4.1.2

19 Dec 17:59
28cc8bc
Compare
Choose a tag to compare

Add PHP 8 Support

v4.1.0

11 Feb 01:40
Compare
Choose a tag to compare
  • Nullable return types

v3.2.15

11 Feb 01:21
a12ff84
Compare
Choose a tag to compare

Fixes errors on old version. Please upgrade to new version of this package tho, 3.2 is not supported.