You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/learning-how-tos/examples-and-guides/translation-beginners-guide.mdx
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,11 +66,11 @@ That’s all you need! Since DeepL is quite good at detecting the source languag
66
66
67
67
### A sample translation request
68
68
69
-
For example, if you wanted to translate the phrase “Hello, bright universe!” from German to Japanese:
69
+
For example, if you wanted to translate the phrase “Hello, bright universe!” to Japanese:
70
70
71
-
* “Hello, everybody” is the `text`
72
-
* German is the `source_lang`
71
+
* “Hello, bright universe!” is the `text`
73
72
* Japanese is the `target_lang`
73
+
* the source language is English, so you could include this as the `source_lang`, but you don't need to.
74
74
75
75
The first tab below shows the HTTP request you’d use here and a typical response from the API. Other tabs show how you’d make this request [using cURL](https://curl.se/docs/tooldocs.html) and using our official client libraries. To see how you’d handle the response in your favorite programming language, check the appropriate tab.
76
76
@@ -174,6 +174,7 @@ The first tab below shows the HTTP request you’d use here and a typical respon
174
174
</Tab>
175
175
<Tabtitle="PHP">
176
176
```php Sample request
177
+
require_once 'vendor/autoload.php';
177
178
use DeepL\Client;
178
179
179
180
$authKey = "{YOUR_API_KEY}"; // replace with your key
@@ -395,6 +396,7 @@ If you look at the HTTP request above, you’ll notice that the translation text
395
396
</Tab>
396
397
<Tabtitle="PHP">
397
398
```php Sample request
399
+
require_once 'vendor/autoload.php';
398
400
use DeepL\Client;
399
401
400
402
$authKey = "{YOUR_API_KEY}"; // replace with your key
@@ -652,6 +654,7 @@ In fact, these text strings can be in different languages. If you don’t set th
652
654
</Tab>
653
655
<Tabtitle="PHP">
654
656
```php Sample request
657
+
require_once 'vendor/autoload.php';
655
658
use DeepL\Client;
656
659
657
660
$authKey = "{YOUR_API_KEY}"; // replace with your key
0 commit comments