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
2828Create 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
3537Use 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```
@@ -110,7 +114,7 @@ You can now check how much you translate, as well as the limit:
110114$usageArray = $deepl->usage();
111115
112116echo '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
138142List glossaries
139143``` php
144+ use \BabyMarkt\DeepL\Glossary;
145+
140146$glossaries = $deepl->listGlossaries();
141147foreach ($glossaries as $glossary) {
142148 var_dump($glossary);
@@ -145,6 +151,8 @@ foreach ($glossaries as $glossary) {
145151
146152Get glossary meta information: creation date, is glossary ready to use ...
147153``` php
154+ use \BabyMarkt\DeepL\Glossary;
155+
148156$glossaryInformation = $deepl->glossaryInformation($glossaryId);
149157var_dump($glossaryInformation);
150158```
You can’t perform that action at this time.
0 commit comments