Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 474995f

Browse files
committed
Merge remote-tracking branch 'origin/master' into DEEP-7-deprecate-library
2 parents 5facac4 + e2ff8b3 commit 474995f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ composer require babymarkt/deepl-php-lib
2828
Create an instance with your auth key:
2929

3030
```php
31+
use \BabyMarkt\DeepL\DeepL;
32+
3133
$authKey = '<AUTH KEY>';
3234
$deepl = new DeepL($authKey);
3335
```
3436

3537
Use the DeepL API Pro:
3638
```php
39+
use \BabyMarkt\DeepL\DeepL;
40+
3741
$authKey = '<AUTH KEY>';
3842
$deepl = new DeepL($authKey,2,'api.deepl.com');
3943
```
@@ -91,8 +95,8 @@ You can check for the supported Source-Languages:
9195
```php
9296
$sourceLanguagesArray = $deepl->languages('source');
9397

94-
foreach ($sourceLanguagesArray as $srouceLanguage) {
95-
echo 'Name: '.$srouceLanguage['name'].' Api-shorthand: '.$srouceLanguage['language'].PHP_EOL;
98+
foreach ($sourceLanguagesArray as $sourceLanguage) {
99+
echo 'Name: '.$sourceLanguage['name'].' Api-shorthand: '.$sourceLanguage['language'].PHP_EOL;
96100
}
97101
```
98102

@@ -110,7 +114,7 @@ You can now check how much you translate, as well as the limit:
110114
$usageArray = $deepl->usage();
111115

112116
echo 'You have used '.$usageArray['character_count'].' of '.$usageArray['character_limit'].' in the current billing period.'.PHP_EOL;
113-
117+
114118
```
115119

116120
### Glossary
@@ -137,6 +141,8 @@ $glossary = $deepl->deleteGlossary($glossaryId);
137141

138142
List glossaries
139143
```php
144+
use \BabyMarkt\DeepL\Glossary;
145+
140146
$glossaries = $deepl->listGlossaries();
141147
foreach ($glossaries as $glossary) {
142148
var_dump($glossary);
@@ -145,6 +151,8 @@ foreach ($glossaries as $glossary) {
145151

146152
Get glossary meta information: creation date, is glossary ready to use ...
147153
```php
154+
use \BabyMarkt\DeepL\Glossary;
155+
148156
$glossaryInformation = $deepl->glossaryInformation($glossaryId);
149157
var_dump($glossaryInformation);
150158
```

0 commit comments

Comments
 (0)