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 · 3 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 :)

@bennyborn
Copy link
Member

Sounds like a nice feature 😊

Since Contao is already shifting more and more settings from the backend to the config.yml I guess we should go the same route.

@markusmilkereit
Copy link
Author

@bennyborn I went through a couple of usability scenarios, and from testing the extension I would say the "formality" would be nicer if a) it's a setting that the editors have access too, and b) if it's a setting that can be also set per page (optionally). So more like the date or time formats are handled - in tl_settings / tl_page. Any thoughts?

@bennyborn
Copy link
Member

I fear that if you leave it up to the editors, especially if there are multiple editors, it might become too inconsistent. Defining it on the root page isn’t a bad idea at all, but I think I would also appreciate the option to set it globally via .env - kind of as a default 😊

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

2 participants