-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Current behaviour:
Adding $options['glossary_id']='0000-000etc.' as per the main docs, does not pass the glossary_id as expected.
Expected behaviour:
When I call ->translateText and pass $options, I expect the options to match the API as documented https://developers.deepl.com/api-reference/translate/request-translation#body-target-lang
Hence I should be able to do $options['glossary_id']='0000-000etc.'
I read that that it is in the Github doc, but wouldn't it make sense to work as per main doc ?
I get it that one can also pass a GlossaryInfo but at least be warned by the library that I should use 'glossary' instead.
An easy fix could be to replace in the Translator
$options[TranslateTextOptions::GLOSSARY] ?? null
with something like
$options[TranslateTextOptions::GLOSSARY] ?? $options[TranslateTextOptions::GLOSSARY_ID] ?? null
Should I do a PR ?
Cheers