Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: set the level of formality for the translations #7

Open
markusmilkereit opened this issue Dec 25, 2024 · 0 comments
Open

Comments

@markusmilkereit
Copy link

DeepL knows a couple of different "formality" levels, and modern branding voices are not always following the default "formal" setting.

Applied to the API call it looks like this, just don't know where you would want the setting to come from, maybe the Contao backend "settings"? Or the config.yml?

\contao-deepl\src\Api\DeepLApi.php line 36:
$this->translator = new Translator($this->apiKey, [TranslateTextOptions::FORMALITY => 'less']);

All formality options here: https://developers.deepl.com/docs/api-reference/translate
Can provide a PR with the change, just wanted to agree on where the setting should be :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant