Skip to content

Commit

Permalink
Add Japanese to list of supported languages for DeepL (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
janit authored Jun 22, 2024
1 parent 58cde4e commit 8821dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Client/Deepl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -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'];
}

0 comments on commit 8821dd8

Please sign in to comment.