diff --git a/src/lib/Client/Deepl.php b/src/lib/Client/Deepl.php index b542ee6..d91015d 100644 --- a/src/lib/Client/Deepl.php +++ b/src/lib/Client/Deepl.php @@ -59,7 +59,7 @@ public function translate(string $payload, ?string $from, string $to): string 'timeout' => 5.0, ] ); - $response = $http->post('/v1/translate', ['form_params' => $parameters]); + $response = $http->post('/v2/translate', ['form_params' => $parameters]); // May use the native json method from guzzle $json = json_decode($response->getBody()->getContents()); @@ -88,5 +88,5 @@ private function normalized(string $languageCode): string /** * List of available code https://www.deepl.com/api.html. */ - private const LANGUAGE_CODES = ['EN', 'DE', 'FR', 'ES', 'IT', 'NL', 'PL']; + private const LANGUAGE_CODES = ['EN', 'DE', 'FR', 'ES', 'IT', 'NL', 'PL', 'JA']; }