diff --git a/src/Clients/DeeplClient.php b/src/Clients/DeeplClient.php index 143e746..f2a1ad9 100644 --- a/src/Clients/DeeplClient.php +++ b/src/Clients/DeeplClient.php @@ -12,6 +12,10 @@ class DeeplClient public function __construct( string $apiKey ) { $this->apiKey = $apiKey; + $envUrl = trim((string) getenv('DEEPL_API_URL')); + if ($envUrl !== '') { + $this->baseUrl = rtrim($envUrl, '/'); + } } /**