This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ composer require babymarkt/deepl-php-lib
28
28
Create an instance with your auth key:
29
29
30
30
``` php
31
+ use \BabyMarkt\DeepL\DeepL;
32
+
31
33
$authKey = '<AUTH KEY >';
32
34
$deepl = new DeepL($authKey);
33
35
```
34
36
35
37
Use the DeepL API Pro:
36
38
``` php
39
+ use \BabyMarkt\DeepL\DeepL;
40
+
37
41
$authKey = '<AUTH KEY >';
38
42
$deepl = new DeepL($authKey,2,'api.deepl.com');
39
43
```
@@ -110,7 +114,7 @@ You can now check how much you translate, as well as the limit:
110
114
$usageArray = $deepl->usage();
111
115
112
116
echo 'You have used '.$usageArray['character_count'].' of '.$usageArray['character_limit'].' in the current billing period.'.PHP_EOL;
113
-
117
+
114
118
```
115
119
116
120
### Glossary
@@ -137,6 +141,8 @@ $glossary = $deepl->deleteGlossary($glossaryId);
137
141
138
142
List glossaries
139
143
``` php
144
+ use \BabyMarkt\DeepL\Glossary;
145
+
140
146
$glossaries = $deepl->listGlossaries();
141
147
foreach ($glossaries as $glossary) {
142
148
var_dump($glossary);
@@ -145,6 +151,8 @@ foreach ($glossaries as $glossary) {
145
151
146
152
Get glossary meta information: creation date, is glossary ready to use ...
147
153
``` php
154
+ use \BabyMarkt\DeepL\Glossary;
155
+
148
156
$glossaryInformation = $deepl->glossaryInformation($glossaryId);
149
157
var_dump($glossaryInformation);
150
158
```
You can’t perform that action at this time.
0 commit comments